summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py9
1 files changed, 8 insertions, 1 deletions
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):