add schedule tick task and beat entry

This commit is contained in:
CREDO23 2026-05-27 17:56:07 +02:00
parent 3b1d7c4389
commit d84240a630
2 changed files with 170 additions and 0 deletions

View file

@ -189,6 +189,7 @@ celery_app = Celery(
"app.tasks.celery_tasks.stale_notification_cleanup_task",
"app.tasks.celery_tasks.stripe_reconciliation_task",
"app.automations.tasks.execute_run",
"app.automations.tasks.schedule_tick",
],
)
@ -283,4 +284,14 @@ celery_app.conf.beat_schedule = {
"expires": 60,
},
},
# Fire due automation schedule triggers. Ticks every minute; per-row cron
# math is precomputed (next_fire_at column) so the tick is an indexed
# lookup, not N cron evaluations.
"automation-schedule-tick": {
"task": "automation_schedule_tick",
"schedule": crontab(minute="*"),
"options": {
"expires": 50,
},
},
}