python - worker does not consume tasks after celery add_consumer is called -
i leverage celery (with rabbitmq backend mq) execute tasks of varying flavors via different queues. 1 requirement consumption (by workers) particular queue should have capability paused , resumed.
celery, seems have this capability via calling add_consumer
, cancel_consumer
. while able cancel consumption of tasks queue particular worker, cannot worker resume consumption calling add_consumer
. the code reproduce issue provided here. guess i'm missing sort of parameter provided either in celeryconfig
or via arguments when starting workers?
would great fresh pairs of eyes on this. there not discussion on stackoverflow regarding add_consumer nor in github. i'm hoping there's experts here willing share thoughts/experience.
--
i running below:
windows os, rabbitmq 3.5.6, erlang 18.1, python 3.3.5, celery 3.1.15
to resume queue, need specify queue name target workers. here how it.
app.control.add_consumer(queue='high', destination=['celery@asus'])
here add_consumer signature
def add_consumer(state, queue, exchange=none, exchange_type=none, routing_key=none, **options):
in case, calling
app.control.add_consumer('high', destination=['celery@high1woka'])
so high
getting passed state , queue empty. not able resume.
Comments
Post a Comment