From 337a9d6172292a29229680251477f3cabe0c0281 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 11 Dec 2014 16:28:22 -0500 Subject: [PATCH] Include backend argument when instantiating Celery Not including the backend argument can lead to AttributeError: DisabledBackend object has no attribute for '_get_task_meta_for'. See e.g. http://stackoverflow.com/questions/23215311/celery-with-rabbitmq-attributeerror-disabledbackend-object-has-no-attribute. At the same time, including the backend argument doesn't seem to harm anything else. --- docs/patterns/celery.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/patterns/celery.rst b/docs/patterns/celery.rst index c1d56472..17abcbaa 100644 --- a/docs/patterns/celery.rst +++ b/docs/patterns/celery.rst @@ -36,7 +36,8 @@ This is all that is necessary to properly integrate Celery with Flask:: from celery import Celery def make_celery(app): - celery = Celery(app.import_name, broker=app.config['CELERY_BROKER_URL']) + celery = Celery(app.import_name, backend=app.config['CELERY_BACKEND'], + broker=app.config['CELERY_BROKER_URL']) celery.conf.update(app.config) TaskBase = celery.Task class ContextTask(TaskBase):