Getting queue where task came from
<p>I have a Celery application with 2 queues in which tasks of a given class (say, MyTask) are consumed round-robin. Some instances of MyTask are routed to the first queue, while other instances go to the second one.</p>

<p>Sometimes, a task needs to instantiate another object of MyTask and invoke <code>apply_async</code> again. Plus, the new task MUST be routed to the same queue as the one that is invoking it.</p>

<p>Problem is, I couldn't find in Celery's docs a way to get the queue from which the first task was consumed. Is there a straightforward, clean way of doing this?</p>

<p>See <code>delivery_info</code> on <a href="http://docs.celeryproject.org/en/latest/userguide/tasks.html#context" rel="nofollow">Task context</a>.</p>

python celery