|
|
|
@ -3,7 +3,6 @@ import os |
|
|
|
from celery import Celery |
|
|
|
from celery import Celery |
|
|
|
from raven import Client |
|
|
|
from raven import Client |
|
|
|
from raven.contrib.celery import register_signal, register_logger_signal |
|
|
|
from raven.contrib.celery import register_signal, register_logger_signal |
|
|
|
from celery.schedules import crontab |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# set the default Django settings module for the 'celery' program. |
|
|
|
# set the default Django settings module for the 'celery' program. |
|
|
|
@ -23,11 +22,3 @@ register_signal(client) |
|
|
|
@app.task(bind=True) |
|
|
|
@app.task(bind=True) |
|
|
|
def debug_task(self): |
|
|
|
def debug_task(self): |
|
|
|
print('Request: {0!r}'.format(self.request)) |
|
|
|
print('Request: {0!r}'.format(self.request)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CELERY_BEAT_SCHEDULE = { |
|
|
|
|
|
|
|
'periodic_billing': { |
|
|
|
|
|
|
|
'task': 'finance.tasks.periodic_billing', |
|
|
|
|
|
|
|
'schedule': crontab(minute='0',hour='*/3',), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|