RunIngestionWorkflow
Purpose
Запускает Terry universal loader для одного persisted data_source_id.
Код: internal/worker/workflows/run_ingestion.go
Input / Output
Input (models.RunIngestionInput):
- data_source_id
- name (optional)
- metadata (optional)
Output (models.RunIngestionResult):
- output.body
- output.metadata
- output.fetched_at
- output.source_type
Called Activities / Children
- Activity:
LoaderActivity.Execute - Child workflows: нет
Retry / Failure Behavior
- Activity timeout:
10m - Retry:
max_attempts=3, backoff5s -> 1m - Workflow завершается ошибкой при invalid
data_source_id, неактивном source/config или ошибке fetcher/middleware.
Manual Run
docker compose exec -T temporal-admin-tools temporal workflow start \
--address temporal:7233 --namespace default --task-queue default \
--type RunIngestionWorkflow \
--workflow-id run-ingestion-manual-$(date +%s) \
--input '{"data_source_id":"<uuid>","name":"manual-run"}'
Related Tables / Logs
- Tables:
terry.workspaces,terry.domains,terry.data_sources,terry.loader_configs - Логи: ошибки resolve config / fetcher / middleware в
worker