From 94ad7c9f133d30d9bec3f217c93d3d959943d773 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 20 Nov 2013 13:09:00 +0200 Subject: 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 --- requirements.txt | 13 ++++++------- 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 diff --git a/tasks.py b/tasks.py index c08c357..fa6b143 100644 --- a/tasks.py +++ b/tasks.py @@ -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): -- cgit v1.3.1