add celery scheduler and break app up into modules

This commit is contained in:
Kyle Mahan 2015-01-27 15:58:08 -08:00
parent d0a9851ae6
commit 9e1e3ad03f
19 changed files with 555 additions and 3 deletions

13
celeryconfig.py Normal file
View file

@ -0,0 +1,13 @@
import datetime
BROKER_URL = 'redis://'
CELERY_RESULT_BACKEND = 'redis'
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']
CELERYBEAT_SCHEDULE = {
'tick-every-5-minutes': {
'task': 'tasks.tick',
'schedule': datetime.timedelta(minutes=5),
}
}