Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Celery Result backend. DisabledBackend object has no attribute _get_task_meta_for

Tags:

python

celery

I have configured celery and the backend:

cleryapp = Celery(
    'tasks_app', brocker='amqp://guest@localhost//',
    backend='db+postgresql://guest@localhost:5432'
)

'results' appears disabled when i start the worker, but I read on another question here that that's not the issue.

The database is getting all the data correctly, but

result = AsyncResult(task_id)

raises

AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'
like image 361
Francesco Della Vedova Avatar asked Jun 19 '14 14:06

Francesco Della Vedova


2 Answers

I found a more convenient way to do that.

result = celery.AsyncResult(task_id)

celery is the Celery instance of your application, not the celery module.

like image 190
Kersey Avatar answered Oct 01 '22 03:10

Kersey


try using this instead where task is the name of your task function:

result = task.AsyncResult(task_id)
like image 25
repalviglator Avatar answered Oct 01 '22 03:10

repalviglator