0

I'm using Celery with RabbitMQ as the broker and redis as the result backend. I'm now manually dispatching tasks to the worker. I can get the task IDs as soon as I sent the tasks out. But actually Celery worker did not work on them. I cannot see the resulted files on my disk. And later when I want to use AsyncResult to check the results, of course I got AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'

I checked RabbitMQ and redis, they're both working (redis-cli ping). The log also says Connected to amqp://myuser:**@127.0.0.1:5672/myvhost.

Another interesting thing is that I actually have another remote server consuming the tasks connected to the broker. It also logs "Connected to amqp", but the two the nodes cannot see each other: mingle: searching for neighbors, mingle: all alone. The system worked before. I wonder where should I start to look for clues. Thanks.

J Freebird
  • 3,664
  • 7
  • 46
  • 81
  • please show your celeryconfig, a sample of your task definition and your task invocation code – scytale Feb 23 '16 at 10:41
  • Maybe you have not set the CELERY_RESULT_BACKEND. Refer this question - http://stackoverflow.com/questions/23215311/celery-with-rabbitmq-attributeerror-disabledbackend-object-has-no-attribute – Adi Krishnan Feb 23 '16 at 10:54
  • Here is another question you could refer - http://stackoverflow.com/questions/24309035/celery-result-backend-disabledbackend-object-has-no-attribute-get-task-meta-fo – Adi Krishnan Feb 23 '16 at 10:56

2 Answers2

0

Regarding the AttributeError message, adding a backend config setting similar to below should help resolve it:

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

0

My celery version is 4.2.1. I set CELERY_RESULT_BACKEND to 'rpc://' and solve this problem.

See also celery result_backend configuration document

Jak Liao
  • 146
  • 1
  • 5