Pas de schedule en mode debug

This commit is contained in:
Jean-Marie Favreau 2025-03-19 22:42:32 +01:00
parent cf4f506168
commit 94b3fa1ccd

View File

@ -579,31 +579,34 @@ def update_orphan_pure_import_events(self):
tasks.delay() tasks.delay()
app.conf.beat_schedule = { if settings.DEBUG:
"daily_orphans_update": { app.conf.beat_schedule = {}
"task": "agenda_culturel.celery.update_orphan_pure_import_events", else:
# Update of orphan events at 2:22 a.m. app.conf.beat_schedule = {
"schedule": crontab(hour=2, minute=22), "daily_orphans_update": {
}, "task": "agenda_culturel.celery.update_orphan_pure_import_events",
"daily_imports": { # Update of orphan events at 2:22 a.m.
"task": "agenda_culturel.celery.daily_imports", "schedule": crontab(hour=2, minute=22),
# Daily imports at 3:14 a.m. },
"schedule": crontab(hour=3, minute=14), "daily_imports": {
}, "task": "agenda_culturel.celery.daily_imports",
"daily_import_failed": { # Daily imports at 3:14 a.m.
"task": "agenda_culturel.celery.run_all_recurrent_imports_failed", "schedule": crontab(hour=3, minute=14),
# As a workaround for FB restrictions },
"schedule": crontab(hour=5, minute=5), "daily_import_failed": {
}, "task": "agenda_culturel.celery.run_all_recurrent_imports_failed",
"daily_screenshot": { # As a workaround for FB restrictions
"task": "agenda_culturel.celery.screenshot", "schedule": crontab(hour=5, minute=5),
"schedule": crontab(hour=3, minute=3), },
}, "daily_screenshot": {
"weekly_imports": { "task": "agenda_culturel.celery.screenshot",
"task": "agenda_culturel.celery.weekly_imports", "schedule": crontab(hour=3, minute=3),
# Daily imports on Mondays at 2:22 a.m. },
"schedule": crontab(hour=2, minute=22, day_of_week="mon"), "weekly_imports": {
}, "task": "agenda_culturel.celery.weekly_imports",
} # Daily imports on Mondays at 2:22 a.m.
"schedule": crontab(hour=2, minute=22, day_of_week="mon"),
},
}
app.conf.timezone = "Europe/Paris" app.conf.timezone = "Europe/Paris"