Anthony Lukach
2017-06-16 21:13:44 UTC
I have a custom `bootstep.ConsumerStep` class that produces two consumers
to read of two separate queues and handle their messages. One of these
queues includes standard Celery-formatted tasks, however rather than
execute these tasks the Consumer simply records their properties in a
database. The other queue contains Celery-formatted result messages, and
records the state of the tasks stored in our database. The Celery worker
is actually not processing any tasks on its own. The custom ConsumerStep
is configured with my app via `app.steps['consumer'].add(MyConsumerStep`.
I'm using the Celery worker command rather than a custom script written
with Kombu as the Celery worker takes care of some things like setting up
the AsyncHub and comes with tooling for controlling concurrency (or so I
thought). Upon testing the command, it appears that the consumers don't
ever run concurrently regardless of the value of the `-c` argument
provided. Additionally, it's awkward to have the worker running and watch
a queue that will never have tasks.
* Am I correct that the ConsumerSteps don't respect the concurrency of a
worker?
* Is there a way to run Consumers concurrently via Celery?
* Am I better off avoiding Celery and just doing this with Kombu? If so,
are there any good examples of building in concurrency tooling into a Kombu
Consumer? Also, any examples of how to start up the AsyncHub in a Kombu
Consumer?
to read of two separate queues and handle their messages. One of these
queues includes standard Celery-formatted tasks, however rather than
execute these tasks the Consumer simply records their properties in a
database. The other queue contains Celery-formatted result messages, and
records the state of the tasks stored in our database. The Celery worker
is actually not processing any tasks on its own. The custom ConsumerStep
is configured with my app via `app.steps['consumer'].add(MyConsumerStep`.
I'm using the Celery worker command rather than a custom script written
with Kombu as the Celery worker takes care of some things like setting up
the AsyncHub and comes with tooling for controlling concurrency (or so I
thought). Upon testing the command, it appears that the consumers don't
ever run concurrently regardless of the value of the `-c` argument
provided. Additionally, it's awkward to have the worker running and watch
a queue that will never have tasks.
* Am I correct that the ConsumerSteps don't respect the concurrency of a
worker?
* Is there a way to run Consumers concurrently via Celery?
* Am I better off avoiding Celery and just doing this with Kombu? If so,
are there any good examples of building in concurrency tooling into a Kombu
Consumer? Also, any examples of how to start up the AsyncHub in a Kombu
Consumer?
--
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+***@googlegroups.com.
To post to this group, send email to celery-***@googlegroups.com.
Visit this group at https://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "celery-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to celery-users+***@googlegroups.com.
To post to this group, send email to celery-***@googlegroups.com.
Visit this group at https://groups.google.com/group/celery-users.
For more options, visit https://groups.google.com/d/optout.