diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2013-11-20 13:09:00 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2013-11-20 13:11:56 +0200 |
| commit | 94ad7c9f133d30d9bec3f217c93d3d959943d773 (patch) | |
| tree | d146a9402e24f89ba18d0b84babf19db791723e4 /tasks.py | |
| parent | 9ed9743224e9c95f492404ec0eb9d5b748ffd34f (diff) | |
Bump to Celery 3.1.4
Add configuration changes that disable pickle as an accepted serializer
Use the json serializer by default
Required before bumping to Celery 3.2
Diffstat (limited to 'tasks.py')
| -rw-r--r-- | tasks.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -9,7 +9,14 @@ from os import environ REDIS_URL = environ.get('REDISTOGO_URL', 'redis://localhost') # Setup the celery instance under the 'tasks' namespace -celery = Celery('tasks', broker=REDIS_URL) +app = Celery('tasks') + +# Use Redis as our broker and define json as the default serializer +app.conf.update( + BROKER_URL=REDIS_URL, + CELERY_TASK_SERIALIZER='json', + CELERY_ACCEPT_CONTENT=['json', 'msgpack', 'yaml'] +) # Define the fibonacci function for use in our task def fib(n): |
