{"action":"opened","issue":{"url":"https://api.github.com/repos/celery/celery/issues/4415","repository_url":"https://api.github.com/repos/celery/celery","labels_url":"https://api.github.com/repos/celery/celery/issues/4415/labels{/name}","comments_url":"https://api.github.com/repos/celery/celery/issues/4415/comments","events_url":"https://api.github.com/repos/celery/celery/issues/4415/events","html_url":"https://github.com/celery/celery/issues/4415","id":278488336,"number":4415,"title":"Celerybeat not delivered to correct queue if specified in options","user":{"login":"Woile","id":2585816,"avatar_url":"https://avatars0.githubusercontent.com/u/2585816?v=4","gravatar_id":"","url":"https://api.github.com/users/Woile","html_url":"https://github.com/Woile","followers_url":"https://api.github.com/users/Woile/followers","following_url":"https://api.github.com/users/Woile/following{/other_user}","gists_url":"https://api.github.com/users/Woile/gists{/gist_id}","starred_url":"https://api.github.com/users/Woile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Woile/subscriptions","organizations_url":"https://api.github.com/users/Woile/orgs","repos_url":"https://api.github.com/users/Woile/repos","events_url":"https://api.github.com/users/Woile/events{/privacy}","received_events_url":"https://api.github.com/users/Woile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-01T14:47:45Z","updated_at":"2017-12-01T14:47:45Z","closed_at":null,"author_association":"NONE","body":"## Checklist\r\n\r\n- [x] I have included the version of celery in the issue.\r\n```\r\n>>> celery --version\r\n4.0.2 (latentcall)\r\n```\r\nand master\r\n```\r\n>>> celery --version\r\n4.1.0 (latentcall)\r\n```\r\n\r\n- [x] I have verified that the issue exists against the `master` branch of Celery.\r\n\r\n## Steps to reproduce\r\n\r\n1. Create a debug task:\r\n```\r\n@app.task(bind=True)\r\ndef debug_task(self, word):\r\n    logger.setLevel(logging.DEBUG)\r\n    logger.info('Is this your word? %s', word)\r\n    print('Request: {0!r}'.format(self.request))\r\n```\r\n2. Add a periodic task like this:\r\n```\r\napp.add_periodic_task(crontab(\r\n        minute='*/1',  # run every minute\r\n    ), debug_task.s('foo'),\r\n        options={'queue': 'foo',\r\n                       'routing_key': 'foo'})\r\n```\r\n\r\n3. Run 2 workers with different queues and a beat\r\n```\r\ncelery worker -A proj worker -Q foo -n foo@%h --loglevel=DEBUG\r\ncelery worker -A proj worker -Q bar -n bar@%h --loglevel=DEBUG\r\ncelery -A main.celery_app beat --loglevel=DEBUG\r\n```\r\n4. Wait and observe.\r\n\r\n## Expected behavior\r\n\r\nThe task is delivered to the right queue according to [the docs](http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html), options will be passed to `apply_async`, so if I add `queue` it should go to the correct queue\r\n\r\n>options\r\n>\r\n> Execution options (dict).\r\n>\r\n> This can be any argument supported by apply_async() – exchange, routing_key, expires, and so on.\r\n\r\n## Actual behavior\r\nThe task is handled by any queue.\r\n\r\n## Solution\r\n\r\nI found that if I specify `queue` as an attribute of `add_periodic_task` it starts working correctly. But I couldn't find any related information in the documentations. Like this:\r\n```\r\napp.add_periodic_task(crontab(\r\n        minute='*/1',  # run every minute\r\n    ), debug_task.s('foo'),\r\n        queue='foo',\r\n        options={'queue': 'foo',\r\n                       'routing_key': 'foo'})\r\n```\r\n\r\nAm I missing something here? "}}
{"actor":{"display_login":"Woile"}}