Created
September 19, 2014 10:47
-
-
Save pyghassen/b90ff3aa6a50ccb15158 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 __future__ import absolute_import | |
from celery import Celery | |
app = Celery('my_project', | |
broker='amqp://', | |
backend='mongodb://', | |
include=['tasks']) | |
# Optional configuration, see the application user guide. | |
app.conf.update( | |
CELERY_TASK_SERIALIZER="json", | |
CELERY_ACCEPT_CONTENT=["json"], | |
CELERY_RESULT_SERIALIZER='json' | |
# CELERY_TASK_RESULT_EXPIRES=3600, | |
# CELERY_MONGODB_BACKEND_SETTINGS={ | |
# "host": "localhost", | |
# "port": 27017, | |
# "database": "celery", | |
# "taskmeta_collection": "my_taskmeta_collection", | |
# }, | |
) | |
if __name__ == '__main__': | |
app.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment