Wednesday, 15 April 2015

python - How to route a chain of tasks to a specific queue in celery? -



python - How to route a chain of tasks to a specific queue in celery? -

when route task particular queue works:

task.apply_async(queue='beetroot')

but if create chain:

chain = task | task

and write

chain.apply_async(queue='beetroot')

it seems ignore queue keyword , assigns default 'celery' queue.

it nice if celery supported routing in chains - tasks executed sequentially in same queue.

i this:

subtask = task.s(*myargs, **mykwargs).set(queue=myqueue) mychain = celery.chain(subtask, subtask2, ...) mychain.apply_async()

python rabbitmq celery chain

No comments:

Post a Comment