|
|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
from celery import Celery
|
|
|
|
|
from celery.schedules import crontab
|
|
|
|
|
|
|
|
|
|
from postamates.settings import CELERY_BROKER_URL
|
|
|
|
|
from postamates.settings import CELERY_NAMESPACE
|
|
|
|
|
@ -15,11 +16,11 @@ app.config_from_object('django.conf:settings', namespace=CELERY_NAMESPACE)
|
|
|
|
|
app.conf.beat_schedule = {
|
|
|
|
|
'age_day_every_24h': {
|
|
|
|
|
'task': 'service.tasks.add_age_day',
|
|
|
|
|
'schedule': 24 * 60 * 60.0,
|
|
|
|
|
'schedule': crontab(minute=0, hour=0),
|
|
|
|
|
},
|
|
|
|
|
'ml_func_every_24h': {
|
|
|
|
|
'task': 'service.tasks.raschet',
|
|
|
|
|
'schedule': 24 * 60 * 60.0,
|
|
|
|
|
'schedule': crontab(minute=0, hour=0),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|