{"action":"created","issue":{"url":"https://api.github.com/repos/celery/celery/issues/2095","labels_url":"https://api.github.com/repos/celery/celery/issues/2095/labels{/name}","comments_url":"https://api.github.com/repos/celery/celery/issues/2095/comments","events_url":"https://api.github.com/repos/celery/celery/issues/2095/events","html_url":"https://github.com/celery/celery/issues/2095","id":35685130,"number":2095,"title":"Unable to specify queue for chained tasks inside a Celery canvas at runtime","user":{"login":"serj-p","id":2565455,"avatar_url":"https://avatars.githubusercontent.com/u/2565455?v=3","gravatar_id":"","url":"https://api.github.com/users/serj-p","html_url":"https://github.com/serj-p","followers_url":"https://api.github.com/users/serj-p/followers","following_url":"https://api.github.com/users/serj-p/following{/other_user}","gists_url":"https://api.github.com/users/serj-p/gists{/gist_id}","starred_url":"https://api.github.com/users/serj-p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serj-p/subscriptions","organizations_url":"https://api.github.com/users/serj-p/orgs","repos_url":"https://api.github.com/users/serj-p/repos","events_url":"https://api.github.com/users/serj-p/events{/privacy}","received_events_url":"https://api.github.com/users/serj-p/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/celery/celery/labels/works-for-me","name":"works-for-me","color":"2a9914"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-06-13T16:12:09Z","updated_at":"2015-04-10T21:16:06Z","closed_at":"2014-10-10T16:16:18Z","body":"Here is what I'm trying to achieve using celery canvas:\r\n\r\n```python\r\ndef _workflow(self, sync_request, forced=True):\r\n   forced_queue = 'io-tasks-high-priority'\r\n   update_last_sync_task = OpportunitiesSync._update_last_sync_timestamp.si(self, sync_request.sync_id, now)\r\n   fetch_opps_tasks = [FetcherAsyncFacade.fetch_for.si(f, user, sync_request.last_sync) for f in self._fetchers]\r\n   check_results_task = check_results.s(sync_request.sync_id, \"REQUIRE_SUCCESS_ANY\")\r\n\r\n   if forced:\r\n        update_last_sync_task.set(queue=forced_queue)\r\n        fetch_opps_tasks = group([t.set(queue=forced_queue) for t in fetch_opps_tasks]).set(queue=forced_queue)\r\n        check_results_task.set(queue=forced_queue)\r\n\r\n   workflow = chain(fetch_opps_tasks, check_results_task, update_last_sync_task)\r\n\r\n   workflow.apply_async()\r\n```\r\n\r\nMy celery config looks like following:\r\n\r\n```python\r\nCELERY_BROKER_URL = amqp://guest:guest@rabbit.devhost.com\r\nCELERY_BACKEND_URL = mongodb://\r\n\r\nHA_POLICY = 'all'\r\n\r\n\r\nLOW_PRIORITY = {'queue': 'low-priority', 'routing_key': 'low-priority'}\r\nIO_TASKS_HIGH_PRIORITY = {'queue': 'io-tasks-high-priority', 'routing_key': 'io-tasks-high-priority'}\r\nIO_TASKS = {'queue': 'io-tasks', 'routing_key': 'io-tasks'}\r\n\r\n\r\nCELERY_DEFAULT_QUEUE = LOW_PRIORITY['queue']\r\n\r\nCELERY_QUEUES = (\r\n  Queue(LOW_PRIORITY['queue'], routing_key=LOW_PRIORITY['routing_key']),\r\n  Queue(IO_TASKS_HIGH_PRIORITY['queue'], routing_key=IO_TASKS_HIGH_PRIORITY['routing_key']),\r\n  Queue(IO_TASKS['queue'], routing_key=IO_TASKS['routing_key']),\r\n)\r\n\r\nCELERY_ROUTES = (\r\n  {\"FetcherAsyncFacade.fetch_for\": IO_TASKS},\r\n)\r\n```\r\n\r\nWhat I'm expecting is that all tasks in a above mentioned canvas will be run on a `io-tasks-high-priority` queue.\r\n\r\nHowever, what happens is the following:\r\n\r\n`FetcherAsyncFacade.fetch_for` tasks go into `IO_TASKS` queue\r\nThe whole canvas task seems to be going into `LOW_PRIORITY` queue which is the default\r\n`IO_TASKS_HIGH_PRIORITY` queue stays empty\r\n\r\nThanks in adavance"},"comment":{"url":"https://api.github.com/repos/celery/celery/issues/comments/91693758","html_url":"https://github.com/celery/celery/issues/2095#issuecomment-91693758","issue_url":"https://api.github.com/repos/celery/celery/issues/2095","id":91693758,"user":{"login":"thedrow","id":48936,"avatar_url":"https://avatars.githubusercontent.com/u/48936?v=3","gravatar_id":"","url":"https://api.github.com/users/thedrow","html_url":"https://github.com/thedrow","followers_url":"https://api.github.com/users/thedrow/followers","following_url":"https://api.github.com/users/thedrow/following{/other_user}","gists_url":"https://api.github.com/users/thedrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thedrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedrow/subscriptions","organizations_url":"https://api.github.com/users/thedrow/orgs","repos_url":"https://api.github.com/users/thedrow/repos","events_url":"https://api.github.com/users/thedrow/events{/privacy}","received_events_url":"https://api.github.com/users/thedrow/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T21:16:06Z","updated_at":"2015-04-10T21:16:06Z","body":"@dashesy Can you provide a failing test case?\r\nPreferably in form of a PR."}}