bluppfisk
bluppfisk

Reputation: 2652

Worker consumes from queue that it isn't working

In celery.py, I have:

app.conf.task_default_queue = "low_prio"

I have started a worker with:

celery -A myapp --queues=high_prio

I have a task defined as follows:

@app.task(name="move", bind=True)
def move(self):
    print(self.request.delivery_info['routing_key'])  # print its own routing key

and an orchestrator that submits the task:

move.apply_async()

The worker confirms it is only listening to the high_prio queue. Output:

[2025-01-23 13:14:29,905: WARNING/ForkPoolWorker-30] low_prio

Why is the worker consuming from the low_prio queue?

Upvotes: 0

Views: 17

Answers (1)

bluppfisk
bluppfisk

Reputation: 2652

I just figured it out. I had a task that was pausing and resuming consumption, and it was apparently assigning the default queue to all workers.

Upvotes: 0

Related Questions