|
|
|
@ -4,6 +4,7 @@ import os
|
|
|
|
|
|
|
|
|
|
from celery import Celery
|
|
|
|
|
from celery.schedules import crontab
|
|
|
|
|
from datetime import timedelta
|
|
|
|
|
|
|
|
|
|
# set the default Django settings module for the 'celery' program.
|
|
|
|
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ccvpn.settings')
|
|
|
|
@ -19,19 +20,19 @@ app.config_from_object('django.conf:settings', namespace='CELERY')
|
|
|
|
|
app.conf.beat_schedule = {
|
|
|
|
|
'payments__check_subscriptions': {
|
|
|
|
|
'task': 'payments.tasks.check_subscriptions',
|
|
|
|
|
'schedule': crontab(hour=1),
|
|
|
|
|
'schedule': timedelta(hours=24),
|
|
|
|
|
},
|
|
|
|
|
'payments__cancel_old_payments': {
|
|
|
|
|
'task': 'payments.tasks.cancel_old_payments',
|
|
|
|
|
'schedule': crontab(hour=2),
|
|
|
|
|
'schedule': timedelta(hours=24),
|
|
|
|
|
},
|
|
|
|
|
'lambdainst__resync': {
|
|
|
|
|
'task': 'lambdainst.tasks.push_all_users',
|
|
|
|
|
'schedule': crontab(day_of_week=1),
|
|
|
|
|
'schedule': timedelta(days=7),
|
|
|
|
|
},
|
|
|
|
|
'lambdainst__notify_account_expiration': {
|
|
|
|
|
'task': 'lambdainst.tasks.notify_account_expiration',
|
|
|
|
|
'schedule': crontab(hour='*/6'),
|
|
|
|
|
'schedule': timedelta(hours=6),
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|