{"action":"created","comment":{"url":"https://api.github.com/repos/nvie/rq/pulls/comments/30767786","id":30767786,"diff_hunk":"@@ -160,11 +160,21 @@ def __init__(self, queues, name=None,\n \n     def validate_queues(self):\n         \"\"\"Sanity check for the given queues.\"\"\"\n-        if not iterable(self.queues):\n-            raise ValueError('Argument queues not iterable.')\n         for queue in self.queues:\n             if not isinstance(queue, self.queue_class):\n-                raise NoQueueError('Give each worker at least one Queue.')\n+                raise NoQueueError('{} is not a queue'.format(queue))\n+\n+    def process_queue_args(self, queue_args):\n+        \"\"\" allow for a variety arguements to queues \"\"\"\n+        if isinstance(queue_args, text_type):\n+            return self.queue_class(name = queue_args)\n+        else:\n+            queue_args = [queue_args] if isinstance(queue_args, text_type) else queue_args","path":"rq/worker.py","position":34,"original_position":34,"commit_id":"decfb63a390479301d24b7f377388cb4c4219d3a","original_commit_id":"decfb63a390479301d24b7f377388cb4c4219d3a","user":{"login":"selwin","id":188658,"avatar_url":"https://avatars.githubusercontent.com/u/188658?v=3","gravatar_id":"","url":"https://api.github.com/users/selwin","html_url":"https://github.com/selwin","followers_url":"https://api.github.com/users/selwin/followers","following_url":"https://api.github.com/users/selwin/following{/other_user}","gists_url":"https://api.github.com/users/selwin/gists{/gist_id}","starred_url":"https://api.github.com/users/selwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selwin/subscriptions","organizations_url":"https://api.github.com/users/selwin/orgs","repos_url":"https://api.github.com/users/selwin/repos","events_url":"https://api.github.com/users/selwin/events{/privacy}","received_events_url":"https://api.github.com/users/selwin/received_events","type":"User","site_admin":false},"body":"This line of code will never be used since we already checked for `text_text` instance in [Line 169](https://github.com/nvie/rq/pull/531/files#diff-1aac421e8c53e895ee40f3b7dc63144fR169)","created_at":"2015-05-21T02:09:25Z","updated_at":"2015-05-21T02:09:25Z","html_url":"https://github.com/nvie/rq/pull/531#discussion_r30767786","pull_request_url":"https://api.github.com/repos/nvie/rq/pulls/531","_links":{"self":{"href":"https://api.github.com/repos/nvie/rq/pulls/comments/30767786"},"html":{"href":"https://github.com/nvie/rq/pull/531#discussion_r30767786"},"pull_request":{"href":"https://api.github.com/repos/nvie/rq/pulls/531"}}},"pull_request":{"url":"https://api.github.com/repos/nvie/rq/pulls/531","id":35448392,"html_url":"https://github.com/nvie/rq/pull/531","diff_url":"https://github.com/nvie/rq/pull/531.diff","patch_url":"https://github.com/nvie/rq/pull/531.patch","issue_url":"https://api.github.com/repos/nvie/rq/issues/531","number":531,"state":"open","locked":false,"title":"updated worker api see issue 255","user":{"login":"RyanMTB","id":7135877,"avatar_url":"https://avatars.githubusercontent.com/u/7135877?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanMTB","html_url":"https://github.com/RyanMTB","followers_url":"https://api.github.com/users/RyanMTB/followers","following_url":"https://api.github.com/users/RyanMTB/following{/other_user}","gists_url":"https://api.github.com/users/RyanMTB/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanMTB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanMTB/subscriptions","organizations_url":"https://api.github.com/users/RyanMTB/orgs","repos_url":"https://api.github.com/users/RyanMTB/repos","events_url":"https://api.github.com/users/RyanMTB/events{/privacy}","received_events_url":"https://api.github.com/users/RyanMTB/received_events","type":"User","site_admin":false},"body":"This is a fix to: https://github.com/nvie/rq/issues/255\r\n\r\nNow all of these will work.\r\n\r\n```python\r\nw = Worker('high')  \r\n\r\nq = Queue(name = 'high')\r\nw = Worker(q)\r\n\r\nqueue_names = ['high', 'normal', 'default']\r\nw = Worker(queue_names)\r\nw = Worker((map(Queue, queue_names))\r\nw = Worker((list(map(Queue, queue_names)))\r\n\r\nw = Worker([queue_names, q])\r\n```\r\n\r\nThis is my first ever attempt at contributing to an open source project. All feedback is greatly appreciated.","created_at":"2015-05-14T18:35:09Z","updated_at":"2015-05-21T02:09:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"390472baa989a15a882ce840abb6338fadfbeb75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nvie/rq/pulls/531/commits","review_comments_url":"https://api.github.com/repos/nvie/rq/pulls/531/comments","review_comment_url":"https://api.github.com/repos/nvie/rq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nvie/rq/issues/531/comments","statuses_url":"https://api.github.com/repos/nvie/rq/statuses/decfb63a390479301d24b7f377388cb4c4219d3a","head":{"label":"RyanMTB:updated_worker_api","ref":"updated_worker_api","sha":"decfb63a390479301d24b7f377388cb4c4219d3a","user":{"login":"RyanMTB","id":7135877,"avatar_url":"https://avatars.githubusercontent.com/u/7135877?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanMTB","html_url":"https://github.com/RyanMTB","followers_url":"https://api.github.com/users/RyanMTB/followers","following_url":"https://api.github.com/users/RyanMTB/following{/other_user}","gists_url":"https://api.github.com/users/RyanMTB/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanMTB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanMTB/subscriptions","organizations_url":"https://api.github.com/users/RyanMTB/orgs","repos_url":"https://api.github.com/users/RyanMTB/repos","events_url":"https://api.github.com/users/RyanMTB/events{/privacy}","received_events_url":"https://api.github.com/users/RyanMTB/received_events","type":"User","site_admin":false},"repo":{"id":35583512,"name":"rq","full_name":"RyanMTB/rq","owner":{"login":"RyanMTB","id":7135877,"avatar_url":"https://avatars.githubusercontent.com/u/7135877?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanMTB","html_url":"https://github.com/RyanMTB","followers_url":"https://api.github.com/users/RyanMTB/followers","following_url":"https://api.github.com/users/RyanMTB/following{/other_user}","gists_url":"https://api.github.com/users/RyanMTB/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanMTB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanMTB/subscriptions","organizations_url":"https://api.github.com/users/RyanMTB/orgs","repos_url":"https://api.github.com/users/RyanMTB/repos","events_url":"https://api.github.com/users/RyanMTB/events{/privacy}","received_events_url":"https://api.github.com/users/RyanMTB/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RyanMTB/rq","description":"Simple job queues for Python","fork":true,"url":"https://api.github.com/repos/RyanMTB/rq","forks_url":"https://api.github.com/repos/RyanMTB/rq/forks","keys_url":"https://api.github.com/repos/RyanMTB/rq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RyanMTB/rq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RyanMTB/rq/teams","hooks_url":"https://api.github.com/repos/RyanMTB/rq/hooks","issue_events_url":"https://api.github.com/repos/RyanMTB/rq/issues/events{/number}","events_url":"https://api.github.com/repos/RyanMTB/rq/events","assignees_url":"https://api.github.com/repos/RyanMTB/rq/assignees{/user}","branches_url":"https://api.github.com/repos/RyanMTB/rq/branches{/branch}","tags_url":"https://api.github.com/repos/RyanMTB/rq/tags","blobs_url":"https://api.github.com/repos/RyanMTB/rq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RyanMTB/rq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RyanMTB/rq/git/refs{/sha}","trees_url":"https://api.github.com/repos/RyanMTB/rq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RyanMTB/rq/statuses/{sha}","languages_url":"https://api.github.com/repos/RyanMTB/rq/languages","stargazers_url":"https://api.github.com/repos/RyanMTB/rq/stargazers","contributors_url":"https://api.github.com/repos/RyanMTB/rq/contributors","subscribers_url":"https://api.github.com/repos/RyanMTB/rq/subscribers","subscription_url":"https://api.github.com/repos/RyanMTB/rq/subscription","commits_url":"https://api.github.com/repos/RyanMTB/rq/commits{/sha}","git_commits_url":"https://api.github.com/repos/RyanMTB/rq/git/commits{/sha}","comments_url":"https://api.github.com/repos/RyanMTB/rq/comments{/number}","issue_comment_url":"https://api.github.com/repos/RyanMTB/rq/issues/comments{/number}","contents_url":"https://api.github.com/repos/RyanMTB/rq/contents/{+path}","compare_url":"https://api.github.com/repos/RyanMTB/rq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RyanMTB/rq/merges","archive_url":"https://api.github.com/repos/RyanMTB/rq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RyanMTB/rq/downloads","issues_url":"https://api.github.com/repos/RyanMTB/rq/issues{/number}","pulls_url":"https://api.github.com/repos/RyanMTB/rq/pulls{/number}","milestones_url":"https://api.github.com/repos/RyanMTB/rq/milestones{/number}","notifications_url":"https://api.github.com/repos/RyanMTB/rq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RyanMTB/rq/labels{/name}","releases_url":"https://api.github.com/repos/RyanMTB/rq/releases{/id}","created_at":"2015-05-14T01:23:52Z","updated_at":"2015-05-14T01:23:53Z","pushed_at":"2015-05-21T02:02:43Z","git_url":"git://github.com/RyanMTB/rq.git","ssh_url":"git@github.com:RyanMTB/rq.git","clone_url":"https://github.com/RyanMTB/rq.git","svn_url":"https://github.com/RyanMTB/rq","homepage":"http://python-rq.org","size":2176,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nvie:master","ref":"master","sha":"d51f0200d794e890edbde9335b7fd4e6c4017852","user":{"login":"nvie","id":83844,"avatar_url":"https://avatars.githubusercontent.com/u/83844?v=3","gravatar_id":"","url":"https://api.github.com/users/nvie","html_url":"https://github.com/nvie","followers_url":"https://api.github.com/users/nvie/followers","following_url":"https://api.github.com/users/nvie/following{/other_user}","gists_url":"https://api.github.com/users/nvie/gists{/gist_id}","starred_url":"https://api.github.com/users/nvie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvie/subscriptions","organizations_url":"https://api.github.com/users/nvie/orgs","repos_url":"https://api.github.com/users/nvie/repos","events_url":"https://api.github.com/users/nvie/events{/privacy}","received_events_url":"https://api.github.com/users/nvie/received_events","type":"User","site_admin":false},"repo":{"id":2771544,"name":"rq","full_name":"nvie/rq","owner":{"login":"nvie","id":83844,"avatar_url":"https://avatars.githubusercontent.com/u/83844?v=3","gravatar_id":"","url":"https://api.github.com/users/nvie","html_url":"https://github.com/nvie","followers_url":"https://api.github.com/users/nvie/followers","following_url":"https://api.github.com/users/nvie/following{/other_user}","gists_url":"https://api.github.com/users/nvie/gists{/gist_id}","starred_url":"https://api.github.com/users/nvie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvie/subscriptions","organizations_url":"https://api.github.com/users/nvie/orgs","repos_url":"https://api.github.com/users/nvie/repos","events_url":"https://api.github.com/users/nvie/events{/privacy}","received_events_url":"https://api.github.com/users/nvie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nvie/rq","description":"Simple job queues for Python","fork":false,"url":"https://api.github.com/repos/nvie/rq","forks_url":"https://api.github.com/repos/nvie/rq/forks","keys_url":"https://api.github.com/repos/nvie/rq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nvie/rq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nvie/rq/teams","hooks_url":"https://api.github.com/repos/nvie/rq/hooks","issue_events_url":"https://api.github.com/repos/nvie/rq/issues/events{/number}","events_url":"https://api.github.com/repos/nvie/rq/events","assignees_url":"https://api.github.com/repos/nvie/rq/assignees{/user}","branches_url":"https://api.github.com/repos/nvie/rq/branches{/branch}","tags_url":"https://api.github.com/repos/nvie/rq/tags","blobs_url":"https://api.github.com/repos/nvie/rq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nvie/rq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nvie/rq/git/refs{/sha}","trees_url":"https://api.github.com/repos/nvie/rq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nvie/rq/statuses/{sha}","languages_url":"https://api.github.com/repos/nvie/rq/languages","stargazers_url":"https://api.github.com/repos/nvie/rq/stargazers","contributors_url":"https://api.github.com/repos/nvie/rq/contributors","subscribers_url":"https://api.github.com/repos/nvie/rq/subscribers","subscription_url":"https://api.github.com/repos/nvie/rq/subscription","commits_url":"https://api.github.com/repos/nvie/rq/commits{/sha}","git_commits_url":"https://api.github.com/repos/nvie/rq/git/commits{/sha}","comments_url":"https://api.github.com/repos/nvie/rq/comments{/number}","issue_comment_url":"https://api.github.com/repos/nvie/rq/issues/comments{/number}","contents_url":"https://api.github.com/repos/nvie/rq/contents/{+path}","compare_url":"https://api.github.com/repos/nvie/rq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nvie/rq/merges","archive_url":"https://api.github.com/repos/nvie/rq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nvie/rq/downloads","issues_url":"https://api.github.com/repos/nvie/rq/issues{/number}","pulls_url":"https://api.github.com/repos/nvie/rq/pulls{/number}","milestones_url":"https://api.github.com/repos/nvie/rq/milestones{/number}","notifications_url":"https://api.github.com/repos/nvie/rq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nvie/rq/labels{/name}","releases_url":"https://api.github.com/repos/nvie/rq/releases{/id}","created_at":"2011-11-14T10:53:48Z","updated_at":"2015-05-21T00:27:51Z","pushed_at":"2015-05-21T02:02:43Z","git_url":"git://github.com/nvie/rq.git","ssh_url":"git@github.com:nvie/rq.git","clone_url":"https://github.com/nvie/rq.git","svn_url":"https://github.com/nvie/rq","homepage":"http://python-rq.org","size":4464,"stargazers_count":2094,"watchers_count":2094,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":344,"mirror_url":null,"open_issues_count":90,"forks":344,"open_issues":90,"watchers":2094,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nvie/rq/pulls/531"},"html":{"href":"https://github.com/nvie/rq/pull/531"},"issue":{"href":"https://api.github.com/repos/nvie/rq/issues/531"},"comments":{"href":"https://api.github.com/repos/nvie/rq/issues/531/comments"},"review_comments":{"href":"https://api.github.com/repos/nvie/rq/pulls/531/comments"},"review_comment":{"href":"https://api.github.com/repos/nvie/rq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nvie/rq/pulls/531/commits"},"statuses":{"href":"https://api.github.com/repos/nvie/rq/statuses/decfb63a390479301d24b7f377388cb4c4219d3a"}}}}