Celery with RabbitMQ: AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

Just keep reading tutorial. It will be explained in Keep Results chapter.

To start Celery you need to provide just broker parameter, which is required to send messages about tasks. If you want to retrieve information about state and results returned by finished tasks you need to set backend parameter. You can find full list with description in Configuration docs: CELERY_RESULT_BACKEND.


I suggest having a look at: http://www.cnblogs.com/fangwenyu/p/3625830.html

There you will see that instead of

app = Celery('tasks', broker='amqp://guest@localhost//')

you should be writing

app = Celery('tasks', backend='amqp', broker='amqp://guest@localhost//')

This is it.


In case anyone made the same easy to make mistake as I did: The tutorial doesn't say so explicitly, but the line

app = Celery('tasks', backend='rpc://', broker='amqp://')

is an EDIT of the line in your tasks.py file. Mine now reads:

app = Celery('tasks', backend='rpc://', broker='amqp://guest@localhost//')

When I run python from the command line I get:

$ python
>>> from tasks import add
>>> result = add.delay(4,50)
>>> result.ready()
>>> False

All tutorials should be easy to follow, even when a little drunk. So far this one doesn't reach that bar.

Tags:

Python

Celery