SyncExchangeCoinsExchangeWorkflow
Purpose
Child workflow для одной биржи внутри SyncExchangeCoinsWorkflow.
Код: internal/worker/workflows/sync_exchange_coins_child.go
Input / Output
Input (models.SyncExchangeCoinsExchangeInput):
- exchange_id
- force_full_refresh
- soft_delete_grace_days
Output (models.SyncExchangeCoinsExchangeResult):
- exchange_id
- status (ok / failed / skipped)
- coins_upserted, networks_upserted, mappings_resolved, quarantine_added
- errors[], has_errors
Called Activities / Children
- Activity:
SyncExchangeCoinsForExchange - Child workflows: нет
Retry / Failure Behavior
- Activity timeout:
8m - Retry:
max_attempts=3, backoff5s -> 1m - Ошибка возвращается в parent workflow для агрегации.
Manual Run
docker compose exec -T temporal temporal workflow start \
--address temporal:7233 --namespace default --task-queue default \
--type SyncExchangeCoinsExchangeWorkflow \
--workflow-id sync-exchange-coins-exchange-manual-$(date +%s) \
--input '{"exchange_id":"gate","force_full_refresh":false,"soft_delete_grace_days":30}'
Related Tables / Logs
- Те же доменные таблицы, что и у parent sync coins pipeline.