SyncExchangesWorkflow
Purpose
Синхронизирует каталог бирж из CoinGecko в таблицу exchanges.
Код: internal/worker/workflows/sync_exchanges.go
Input / Output
Input: отсутствует.
Output (models.SyncExchangesResult):
- exchanges_processed
- exchanges_inserted
- exchanges_updated
- errors[]
- has_errors
Called Activities / Children
- Activity:
SyncExchangesFromCoinGecko - Child workflows: нет
Retry / Failure Behavior
- Activity timeout:
2m - Retry:
max_attempts=3, backoff10s -> 1m - Ошибка activity завершает workflow с
failed.
Manual Run
docker compose exec -T temporal temporal workflow start \
--address temporal:7233 --namespace default --task-queue default \
--type SyncExchangesWorkflow \
--workflow-id sync-exchanges-manual-$(date +%s)
Related Tables / Logs
- Tables:
exchanges - Логи:
Fetching exchanges from CoinGecko API,Exchange sync completed