{"action":"created","comment":{"url":"https://api.github.com/repos/enderlabs/eventmq/pulls/comments/51977055","id":51977055,"diff_hunk":"@@ -90,19 +82,16 @@ def _start_event_loop(self):\n         \"\"\"\n         # Acknowledgment has come\n         # Send a READY for each available worker\n-        for i in range(0, self.available_workers):\n+        for i in range(0, conf.WORKERS):","path":"eventmq/jobmanager.py","position":53,"original_position":53,"commit_id":"7fdac606d71ef1bc4583b840b9ba1b51d645a9b9","original_commit_id":"7fdac606d71ef1bc4583b840b9ba1b51d645a9b9","user":{"login":"com4","id":4676,"avatar_url":"https://avatars.githubusercontent.com/u/4676?v=3","gravatar_id":"","url":"https://api.github.com/users/com4","html_url":"https://github.com/com4","followers_url":"https://api.github.com/users/com4/followers","following_url":"https://api.github.com/users/com4/following{/other_user}","gists_url":"https://api.github.com/users/com4/gists{/gist_id}","starred_url":"https://api.github.com/users/com4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/com4/subscriptions","organizations_url":"https://api.github.com/users/com4/orgs","repos_url":"https://api.github.com/users/com4/repos","events_url":"https://api.github.com/users/com4/events{/privacy}","received_events_url":"https://api.github.com/users/com4/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/versioned/images/favicon.png) Issue found: [Unused variable 'i'](https://www.codacy.com/app/jason_4/eventmq/file/1980837457/issues/source?bid=3102680&fileBranchId=3117312#l85)","created_at":"2016-02-05T04:42:01Z","updated_at":"2016-02-05T04:42:01Z","html_url":"https://github.com/enderlabs/eventmq/pull/5#discussion_r51977055","pull_request_url":"https://api.github.com/repos/enderlabs/eventmq/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/comments/51977055"},"html":{"href":"https://github.com/enderlabs/eventmq/pull/5#discussion_r51977055"},"pull_request":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/enderlabs/eventmq/pulls/5","id":58385626,"html_url":"https://github.com/enderlabs/eventmq/pull/5","diff_url":"https://github.com/enderlabs/eventmq/pull/5.diff","patch_url":"https://github.com/enderlabs/eventmq/pull/5.patch","issue_url":"https://api.github.com/repos/enderlabs/eventmq/issues/5","number":5,"state":"open","locked":false,"title":"Feature/queues","user":{"login":"sideshowdave7","id":2600574,"avatar_url":"https://avatars.githubusercontent.com/u/2600574?v=3","gravatar_id":"","url":"https://api.github.com/users/sideshowdave7","html_url":"https://github.com/sideshowdave7","followers_url":"https://api.github.com/users/sideshowdave7/followers","following_url":"https://api.github.com/users/sideshowdave7/following{/other_user}","gists_url":"https://api.github.com/users/sideshowdave7/gists{/gist_id}","starred_url":"https://api.github.com/users/sideshowdave7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sideshowdave7/subscriptions","organizations_url":"https://api.github.com/users/sideshowdave7/orgs","repos_url":"https://api.github.com/users/sideshowdave7/repos","events_url":"https://api.github.com/users/sideshowdave7/events{/privacy}","received_events_url":"https://api.github.com/users/sideshowdave7/received_events","type":"User","site_admin":false},"body":"What\r\n\r\nUse a multiprocessing queue to talk between jobmanager and worker threads. request_queue puts payloads of jobs into the worker pool, as each worker finishes it responds to the finished_queue that sends a READY back to router freeing another job slot.\r\n\r\nHappy side-effect is that logging just gets redirected to stdout like you'd expect so it just works.\r\n\r\nWhy\r\n\r\nSimple and thread-safe worker pool\r\n\r\nTests\r\nI put both workers in prod on this version and tested slack/dropbox","created_at":"2016-02-05T03:54:35Z","updated_at":"2016-02-05T04:42:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0e12ef82cfceb6fca00545a2b83651608cf6bbb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/enderlabs/eventmq/pulls/5/commits","review_comments_url":"https://api.github.com/repos/enderlabs/eventmq/pulls/5/comments","review_comment_url":"https://api.github.com/repos/enderlabs/eventmq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enderlabs/eventmq/issues/5/comments","statuses_url":"https://api.github.com/repos/enderlabs/eventmq/statuses/7fdac606d71ef1bc4583b840b9ba1b51d645a9b9","head":{"label":"sideshowdave7:feature/queues","ref":"feature/queues","sha":"7fdac606d71ef1bc4583b840b9ba1b51d645a9b9","user":{"login":"sideshowdave7","id":2600574,"avatar_url":"https://avatars.githubusercontent.com/u/2600574?v=3","gravatar_id":"","url":"https://api.github.com/users/sideshowdave7","html_url":"https://github.com/sideshowdave7","followers_url":"https://api.github.com/users/sideshowdave7/followers","following_url":"https://api.github.com/users/sideshowdave7/following{/other_user}","gists_url":"https://api.github.com/users/sideshowdave7/gists{/gist_id}","starred_url":"https://api.github.com/users/sideshowdave7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sideshowdave7/subscriptions","organizations_url":"https://api.github.com/users/sideshowdave7/orgs","repos_url":"https://api.github.com/users/sideshowdave7/repos","events_url":"https://api.github.com/users/sideshowdave7/events{/privacy}","received_events_url":"https://api.github.com/users/sideshowdave7/received_events","type":"User","site_admin":false},"repo":{"id":51105260,"name":"eventmq","full_name":"sideshowdave7/eventmq","owner":{"login":"sideshowdave7","id":2600574,"avatar_url":"https://avatars.githubusercontent.com/u/2600574?v=3","gravatar_id":"","url":"https://api.github.com/users/sideshowdave7","html_url":"https://github.com/sideshowdave7","followers_url":"https://api.github.com/users/sideshowdave7/followers","following_url":"https://api.github.com/users/sideshowdave7/following{/other_user}","gists_url":"https://api.github.com/users/sideshowdave7/gists{/gist_id}","starred_url":"https://api.github.com/users/sideshowdave7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sideshowdave7/subscriptions","organizations_url":"https://api.github.com/users/sideshowdave7/orgs","repos_url":"https://api.github.com/users/sideshowdave7/repos","events_url":"https://api.github.com/users/sideshowdave7/events{/privacy}","received_events_url":"https://api.github.com/users/sideshowdave7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sideshowdave7/eventmq","description":"","fork":true,"url":"https://api.github.com/repos/sideshowdave7/eventmq","forks_url":"https://api.github.com/repos/sideshowdave7/eventmq/forks","keys_url":"https://api.github.com/repos/sideshowdave7/eventmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sideshowdave7/eventmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sideshowdave7/eventmq/teams","hooks_url":"https://api.github.com/repos/sideshowdave7/eventmq/hooks","issue_events_url":"https://api.github.com/repos/sideshowdave7/eventmq/issues/events{/number}","events_url":"https://api.github.com/repos/sideshowdave7/eventmq/events","assignees_url":"https://api.github.com/repos/sideshowdave7/eventmq/assignees{/user}","branches_url":"https://api.github.com/repos/sideshowdave7/eventmq/branches{/branch}","tags_url":"https://api.github.com/repos/sideshowdave7/eventmq/tags","blobs_url":"https://api.github.com/repos/sideshowdave7/eventmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sideshowdave7/eventmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sideshowdave7/eventmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/sideshowdave7/eventmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sideshowdave7/eventmq/statuses/{sha}","languages_url":"https://api.github.com/repos/sideshowdave7/eventmq/languages","stargazers_url":"https://api.github.com/repos/sideshowdave7/eventmq/stargazers","contributors_url":"https://api.github.com/repos/sideshowdave7/eventmq/contributors","subscribers_url":"https://api.github.com/repos/sideshowdave7/eventmq/subscribers","subscription_url":"https://api.github.com/repos/sideshowdave7/eventmq/subscription","commits_url":"https://api.github.com/repos/sideshowdave7/eventmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/sideshowdave7/eventmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/sideshowdave7/eventmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/sideshowdave7/eventmq/issues/comments{/number}","contents_url":"https://api.github.com/repos/sideshowdave7/eventmq/contents/{+path}","compare_url":"https://api.github.com/repos/sideshowdave7/eventmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sideshowdave7/eventmq/merges","archive_url":"https://api.github.com/repos/sideshowdave7/eventmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sideshowdave7/eventmq/downloads","issues_url":"https://api.github.com/repos/sideshowdave7/eventmq/issues{/number}","pulls_url":"https://api.github.com/repos/sideshowdave7/eventmq/pulls{/number}","milestones_url":"https://api.github.com/repos/sideshowdave7/eventmq/milestones{/number}","notifications_url":"https://api.github.com/repos/sideshowdave7/eventmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sideshowdave7/eventmq/labels{/name}","releases_url":"https://api.github.com/repos/sideshowdave7/eventmq/releases{/id}","deployments_url":"https://api.github.com/repos/sideshowdave7/eventmq/deployments","created_at":"2016-02-04T21:02:18Z","updated_at":"2016-02-04T21:02:19Z","pushed_at":"2016-02-05T03:53:55Z","git_url":"git://github.com/sideshowdave7/eventmq.git","ssh_url":"git@github.com:sideshowdave7/eventmq.git","clone_url":"https://github.com/sideshowdave7/eventmq.git","svn_url":"https://github.com/sideshowdave7/eventmq","homepage":null,"size":1115,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"enderlabs:master","ref":"master","sha":"0748aca74bf96e6f54e0b14e4321349ea480a6e2","user":{"login":"enderlabs","id":408750,"avatar_url":"https://avatars.githubusercontent.com/u/408750?v=3","gravatar_id":"","url":"https://api.github.com/users/enderlabs","html_url":"https://github.com/enderlabs","followers_url":"https://api.github.com/users/enderlabs/followers","following_url":"https://api.github.com/users/enderlabs/following{/other_user}","gists_url":"https://api.github.com/users/enderlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/enderlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enderlabs/subscriptions","organizations_url":"https://api.github.com/users/enderlabs/orgs","repos_url":"https://api.github.com/users/enderlabs/repos","events_url":"https://api.github.com/users/enderlabs/events{/privacy}","received_events_url":"https://api.github.com/users/enderlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":50213274,"name":"eventmq","full_name":"enderlabs/eventmq","owner":{"login":"enderlabs","id":408750,"avatar_url":"https://avatars.githubusercontent.com/u/408750?v=3","gravatar_id":"","url":"https://api.github.com/users/enderlabs","html_url":"https://github.com/enderlabs","followers_url":"https://api.github.com/users/enderlabs/followers","following_url":"https://api.github.com/users/enderlabs/following{/other_user}","gists_url":"https://api.github.com/users/enderlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/enderlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enderlabs/subscriptions","organizations_url":"https://api.github.com/users/enderlabs/orgs","repos_url":"https://api.github.com/users/enderlabs/repos","events_url":"https://api.github.com/users/enderlabs/events{/privacy}","received_events_url":"https://api.github.com/users/enderlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enderlabs/eventmq","description":"","fork":false,"url":"https://api.github.com/repos/enderlabs/eventmq","forks_url":"https://api.github.com/repos/enderlabs/eventmq/forks","keys_url":"https://api.github.com/repos/enderlabs/eventmq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enderlabs/eventmq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enderlabs/eventmq/teams","hooks_url":"https://api.github.com/repos/enderlabs/eventmq/hooks","issue_events_url":"https://api.github.com/repos/enderlabs/eventmq/issues/events{/number}","events_url":"https://api.github.com/repos/enderlabs/eventmq/events","assignees_url":"https://api.github.com/repos/enderlabs/eventmq/assignees{/user}","branches_url":"https://api.github.com/repos/enderlabs/eventmq/branches{/branch}","tags_url":"https://api.github.com/repos/enderlabs/eventmq/tags","blobs_url":"https://api.github.com/repos/enderlabs/eventmq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enderlabs/eventmq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enderlabs/eventmq/git/refs{/sha}","trees_url":"https://api.github.com/repos/enderlabs/eventmq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enderlabs/eventmq/statuses/{sha}","languages_url":"https://api.github.com/repos/enderlabs/eventmq/languages","stargazers_url":"https://api.github.com/repos/enderlabs/eventmq/stargazers","contributors_url":"https://api.github.com/repos/enderlabs/eventmq/contributors","subscribers_url":"https://api.github.com/repos/enderlabs/eventmq/subscribers","subscription_url":"https://api.github.com/repos/enderlabs/eventmq/subscription","commits_url":"https://api.github.com/repos/enderlabs/eventmq/commits{/sha}","git_commits_url":"https://api.github.com/repos/enderlabs/eventmq/git/commits{/sha}","comments_url":"https://api.github.com/repos/enderlabs/eventmq/comments{/number}","issue_comment_url":"https://api.github.com/repos/enderlabs/eventmq/issues/comments{/number}","contents_url":"https://api.github.com/repos/enderlabs/eventmq/contents/{+path}","compare_url":"https://api.github.com/repos/enderlabs/eventmq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enderlabs/eventmq/merges","archive_url":"https://api.github.com/repos/enderlabs/eventmq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enderlabs/eventmq/downloads","issues_url":"https://api.github.com/repos/enderlabs/eventmq/issues{/number}","pulls_url":"https://api.github.com/repos/enderlabs/eventmq/pulls{/number}","milestones_url":"https://api.github.com/repos/enderlabs/eventmq/milestones{/number}","notifications_url":"https://api.github.com/repos/enderlabs/eventmq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enderlabs/eventmq/labels{/name}","releases_url":"https://api.github.com/repos/enderlabs/eventmq/releases{/id}","deployments_url":"https://api.github.com/repos/enderlabs/eventmq/deployments","created_at":"2016-01-22T23:12:04Z","updated_at":"2016-01-28T18:36:00Z","pushed_at":"2016-02-05T03:54:35Z","git_url":"git://github.com/enderlabs/eventmq.git","ssh_url":"git@github.com:enderlabs/eventmq.git","clone_url":"https://github.com/enderlabs/eventmq.git","svn_url":"https://github.com/enderlabs/eventmq","homepage":null,"size":1087,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/5"},"html":{"href":"https://github.com/enderlabs/eventmq/pull/5"},"issue":{"href":"https://api.github.com/repos/enderlabs/eventmq/issues/5"},"comments":{"href":"https://api.github.com/repos/enderlabs/eventmq/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enderlabs/eventmq/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/enderlabs/eventmq/statuses/7fdac606d71ef1bc4583b840b9ba1b51d645a9b9"}}}}