Skip to content

SyncGateWalletEnrichmentWorkflow

Purpose

Дообогащает нерешенные missing_network_mapping кейсы для Gate через endpoint wallet/currency_chains.

Код: internal/worker/workflows/sync_gate_wallet_enrichment.go

Input / Output

Input (models.SyncGateWalletEnrichmentInput): - currencies[] (optional) - source (optional) - max_currencies (optional) - dry_run (optional)

Output (models.SyncGateWalletEnrichmentResult): - status (ok/partial) - source - currencies_requested, currencies_from_input, currencies_from_quarantine - wallet_symbols_200, wallet_symbols_invalid_or_delisted, wallet_symbols_failed - wallet_networks_resolved, quarantine_removed, quarantine_remaining - errors[], has_errors

Called Activities / Children

Retry / Failure Behavior

  • Activity timeout: 8m
  • Retry: max_attempts=3, backoff 5s -> 1m
  • Ошибки enrichment обычно отражаются как partial (status=partial) без hard-fail бизнес-пайплайна.

Manual Run

docker compose exec -T temporal temporal workflow start \
  --address temporal:7233 --namespace default --task-queue default \
  --type SyncGateWalletEnrichmentWorkflow \
  --workflow-id sync-gate-wallet-enrichment-manual-$(date +%s) \
  --input '{"currencies":["USDT","USDC"],"source":"manual","dry_run":false}'
  • Tables: asset_mapping_quarantine, exchange_asset_networks, exchange_asset_mappings, exchange_symbol_assets, global_assets, global_asset_networks