Pas de schedule en mode debug
This commit is contained in:
parent
cf4f506168
commit
94b3fa1ccd
@ -579,31 +579,34 @@ def update_orphan_pure_import_events(self):
|
||||
tasks.delay()
|
||||
|
||||
|
||||
app.conf.beat_schedule = {
|
||||
"daily_orphans_update": {
|
||||
"task": "agenda_culturel.celery.update_orphan_pure_import_events",
|
||||
# Update of orphan events at 2:22 a.m.
|
||||
"schedule": crontab(hour=2, minute=22),
|
||||
},
|
||||
"daily_imports": {
|
||||
"task": "agenda_culturel.celery.daily_imports",
|
||||
# Daily imports at 3:14 a.m.
|
||||
"schedule": crontab(hour=3, minute=14),
|
||||
},
|
||||
"daily_import_failed": {
|
||||
"task": "agenda_culturel.celery.run_all_recurrent_imports_failed",
|
||||
# As a workaround for FB restrictions
|
||||
"schedule": crontab(hour=5, minute=5),
|
||||
},
|
||||
"daily_screenshot": {
|
||||
"task": "agenda_culturel.celery.screenshot",
|
||||
"schedule": crontab(hour=3, minute=3),
|
||||
},
|
||||
"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"),
|
||||
},
|
||||
}
|
||||
if settings.DEBUG:
|
||||
app.conf.beat_schedule = {}
|
||||
else:
|
||||
app.conf.beat_schedule = {
|
||||
"daily_orphans_update": {
|
||||
"task": "agenda_culturel.celery.update_orphan_pure_import_events",
|
||||
# Update of orphan events at 2:22 a.m.
|
||||
"schedule": crontab(hour=2, minute=22),
|
||||
},
|
||||
"daily_imports": {
|
||||
"task": "agenda_culturel.celery.daily_imports",
|
||||
# Daily imports at 3:14 a.m.
|
||||
"schedule": crontab(hour=3, minute=14),
|
||||
},
|
||||
"daily_import_failed": {
|
||||
"task": "agenda_culturel.celery.run_all_recurrent_imports_failed",
|
||||
# As a workaround for FB restrictions
|
||||
"schedule": crontab(hour=5, minute=5),
|
||||
},
|
||||
"daily_screenshot": {
|
||||
"task": "agenda_culturel.celery.screenshot",
|
||||
"schedule": crontab(hour=3, minute=3),
|
||||
},
|
||||
"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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user