0
votes

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.

2
please show your celeryconfig, a sample of your task definition and your task invocation code - scytale
Maybe you have not set the CELERY_RESULT_BACKEND. Refer this question - stackoverflow.com/questions/23215311/… - Adi Krishnan
Here is another question you could refer - stackoverflow.com/questions/24309035/… - Adi Krishnan

2 Answers

0
votes

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
votes

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