J Freebird
J Freebird

Reputation: 3910

Celery worker not consuming task and not retrieving results

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.

Upvotes: 0

Views: 2366

Answers (2)

Jak Liao
Jak Liao

Reputation: 166

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

Upvotes: 0

fptiangco
fptiangco

Reputation: 1

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://')

Upvotes: 0

Related Questions