diff options
| -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): |
