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 | |
| 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
| -rw-r--r-- | requirements.txt | 13 | ||||
| -rw-r--r-- | tasks.py | 9 |
2 files changed, 14 insertions, 8 deletions
diff --git a/requirements.txt b/requirements.txt index 28f66ca..5f0186a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,7 @@ -amqplib==1.0.2 +amqp==1.3.3 anyjson==0.3.3 -billiard==2.7.3.18 -celery==3.0.12 -kombu==2.4.8 -python-dateutil==1.5 -redis==2.7.1 -wsgiref==0.1.2 +billiard==3.3.0.7 +celery==3.1.4 +kombu==3.0.5 +pytz==2013.8 +redis==2.8.0 @@ -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): |
