Last active
December 18, 2015 13:19
-
-
Save skillachie/5789056 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery.schedules import crontab | |
CELERY_RESULT_BACKEND = "mongodb" | |
CELERY_MONGODB_BACKEND_SETTINGS = { | |
"host": "127.0.0.1", | |
"port": 27017, | |
"database": "jobs", | |
"taskmeta_collection": "stock_taskmeta_collection", | |
} | |
#used to schedule tasks periodically and passing optional arguments | |
#Can be very useful. Celery does not seem to support scheduled task but only periodic | |
CELERYBEAT_SCHEDULE = { | |
'every-minute': { | |
'task': 'tasks.add', | |
'schedule': crontab(minute='*/1'), | |
'args': (1,2), | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment