New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task priorities #2835

Closed
malthe opened this Issue Oct 2, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@malthe

malthe commented Oct 2, 2015

The documentation says that Celery does not support task priorities, but there is a priority argument that takes an integer 0-9.

        :keyword priority: The task priority, a number between 0 and 9.
                           Defaults to the :attr:`priority` attribute.

What gives?

Also, does Celery support queue priorities?

That is, if you say -Q hiprio,loprio does that mean that queue <hiprio> is looked at first?

The documentation is lacking.

@lexqt

This comment has been minimized.

Show comment
Hide comment
@lexqt

lexqt Oct 28, 2015

Moreover doc says:

Does celery support task priorities?
Answer: No. In theory, yes, as AMQP supports priorities. However RabbitMQ doesn’t implement them yet.

But as of version 3.5.0 ( https://www.rabbitmq.com/changelog.html ) RabbitMQ supports priority queues
https://www.rabbitmq.com/priority.html

UPD: Found this #2635

lexqt commented Oct 28, 2015

Moreover doc says:

Does celery support task priorities?
Answer: No. In theory, yes, as AMQP supports priorities. However RabbitMQ doesn’t implement them yet.

But as of version 3.5.0 ( https://www.rabbitmq.com/changelog.html ) RabbitMQ supports priority queues
https://www.rabbitmq.com/priority.html

UPD: Found this #2635

@ask ask closed this in fe793b2 Oct 28, 2015

@ask

This comment has been minimized.

Show comment
Hide comment
@ask

ask Oct 28, 2015

Member

hipri is not looked at first, the messages are consumed in the order in which they were published when using RabbitMQ.

The idea of using priority queues like this is that you send high priority tasks to a dedicated queue, and you have more workers consuming from the high priority queue than low priority ones, or the machines consuming from the hipri queue is more powerful, or similar.

Member

ask commented Oct 28, 2015

hipri is not looked at first, the messages are consumed in the order in which they were published when using RabbitMQ.

The idea of using priority queues like this is that you send high priority tasks to a dedicated queue, and you have more workers consuming from the high priority queue than low priority ones, or the machines consuming from the hipri queue is more powerful, or similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment