separate nightly tasks and other scheduled tasks.

other tasks is anything that is run on a different frequency than
nightly
This commit is contained in:
Leo Hemsted
2019-01-14 17:22:41 +00:00
parent ef4b2c0564
commit d3d56a3224
6 changed files with 340 additions and 325 deletions

View File

@@ -159,6 +159,7 @@ class Config(object):
CELERY_TASK_SERIALIZER = 'json'
CELERY_IMPORTS = ('app.celery.tasks', 'app.celery.scheduled_tasks', 'app.celery.reporting_tasks')
CELERYBEAT_SCHEDULE = {
# app/celery/scheduled_tasks.py
'run-scheduled-jobs': {
'task': 'run-scheduled-jobs',
'schedule': crontab(minute=1),
@@ -189,7 +190,7 @@ class Config(object):
'schedule': crontab(minute='0, 15, 30, 45'),
'options': {'queue': QueueNames.PERIODIC}
},
# nightly tasks:
# app/celery/nightly_tasks.py
'timeout-sending-notifications': {
'task': 'timeout-sending-notifications',
'schedule': crontab(hour=0, minute=5),