Skip to content

EnsureGateLaunchpoolScheduleWorkflow

Purpose

Idempotent upsert расписания Temporal для регулярного запуска SyncGateLaunchpoolWorkflow.

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

Input / Output

Input (models.EnsureGateLaunchpoolScheduleInput): - schedule_id - cron - timezone - task_queue - page - page_size - status (optional) - paused

Output (models.EnsureGateLaunchpoolScheduleResult): - schedule_id - created - updated - paused

Called Activities / Children

Retry / Failure Behavior

  • Activity timeout: 1m
  • Retry: max_attempts=3, backoff 2s -> 20s
  • Ошибки create/update schedule завершают workflow с failed.

Manual Run

docker compose exec -T temporal temporal workflow start \
  --address temporal:7233 --namespace default --task-queue default \
  --type EnsureGateLaunchpoolScheduleWorkflow \
  --workflow-id ensure-gate-launchpool-schedule-manual-$(date +%s) \
  --input '{"schedule_id":"sync-gate-launchpool-5m","cron":"*/5 * * * *","timezone":"UTC","task_queue":"default","page":1,"page_size":1000,"status":0,"paused":false}'
  • Table changes: отсутствуют (управление Temporal schedule API)
  • Связанный target workflow: SyncGateLaunchpoolWorkflow