GitHub PullRequestReviewCommentEvent at 2014-11-07 00:28:11
Repository: emque-consuming
Actor: bluefocus
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/comments/19987261","id":19987261,"diff_hunk":"@@ -44,6 +44,23 @@ def stop\n           @connection.stop\n         end\n \n+        def worker(topic:, command:)\n+          if workers.has_key?(topic)\n+            case command\n+            when :down\n+              worker = workers[topic].pop\n+              worker.stop if worker\n+            when :up\n+              workers[topic] << new_worker(topic)\n+              workers[topic].last.async.start","path":"lib/emque/consuming/rabbitmq/manager.rb","position":12,"original_position":12,"commit_id":"3de9c2dcfde4d0ccb62d80ac44d136146110122f","original_commit_id":"3de9c2dcfde4d0ccb62d80ac44d136146110122f","user":{"login":"bluefocus","id":1116695,"avatar_url":"https://avatars.githubusercontent.com/u/1116695?v=2","gravatar_id":"","url":"https://api.github.com/users/bluefocus","html_url":"https://github.com/bluefocus","followers_url":"https://api.github.com/users/bluefocus/followers","following_url":"https://api.github.com/users/bluefocus/following{/other_user}","gists_url":"https://api.github.com/users/bluefocus/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefocus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefocus/subscriptions","organizations_url":"https://api.github.com/users/bluefocus/orgs","repos_url":"https://api.github.com/users/bluefocus/repos","events_url":"https://api.github.com/users/bluefocus/events{/privacy}","received_events_url":"https://api.github.com/users/bluefocus/received_events","type":"User","site_admin":false},"body":"The else is nothing special. We don't want to raise an error here because it would bring down the service. The guard is in place in case anyone else decides to call it directly and fudges the topic. I suppose we could remove the if statement entirely. Our use case is also guarded here: https://github.com/teamsnap/emque-consuming/pull/14/files#diff-5a7642ec6770df32debbeab3973b1413R54","created_at":"2014-11-07T00:28:11Z","updated_at":"2014-11-07T00:28:11Z","html_url":"https://github.com/teamsnap/emque-consuming/pull/14#discussion_r19987261","pull_request_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/comments/19987261"},"html":{"href":"https://github.com/teamsnap/emque-consuming/pull/14#discussion_r19987261"},"pull_request":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14","id":24011029,"html_url":"https://github.com/teamsnap/emque-consuming/pull/14","diff_url":"https://github.com/teamsnap/emque-consuming/pull/14.diff","patch_url":"https://github.com/teamsnap/emque-consuming/pull/14.patch","issue_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/14","number":14,"state":"open","locked":false,"title":"Adds simple web interface for status & ...","user":{"login":"bluefocus","id":1116695,"avatar_url":"https://avatars.githubusercontent.com/u/1116695?v=2","gravatar_id":"","url":"https://api.github.com/users/bluefocus","html_url":"https://github.com/bluefocus","followers_url":"https://api.github.com/users/bluefocus/followers","following_url":"https://api.github.com/users/bluefocus/following{/other_user}","gists_url":"https://api.github.com/users/bluefocus/gists{/gist_id}","starred_url":"https://api.github.com/users/bluefocus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluefocus/subscriptions","organizations_url":"https://api.github.com/users/bluefocus/orgs","repos_url":"https://api.github.com/users/bluefocus/repos","events_url":"https://api.github.com/users/bluefocus/events{/privacy}","received_events_url":"https://api.github.com/users/bluefocus/received_events","type":"User","site_admin":false},"body":"spinning up / down additional workers on a topic","created_at":"2014-11-06T20:43:40Z","updated_at":"2014-11-07T00:28:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e47175fb68dee98526993ce54f531712c93fc618","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14/commits","review_comments_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14/comments","review_comment_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/comments/{number}","comments_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/14/comments","statuses_url":"https://api.github.com/repos/teamsnap/emque-consuming/statuses/3de9c2dcfde4d0ccb62d80ac44d136146110122f","head":{"label":"teamsnap:status","ref":"status","sha":"3de9c2dcfde4d0ccb62d80ac44d136146110122f","user":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=2","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"repo":{"id":24053614,"name":"emque-consuming","full_name":"teamsnap/emque-consuming","owner":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=2","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamsnap/emque-consuming","description":"A layer on top of poseidon-cluster for consuming kafka messages generated by emque-producing","fork":false,"url":"https://api.github.com/repos/teamsnap/emque-consuming","forks_url":"https://api.github.com/repos/teamsnap/emque-consuming/forks","keys_url":"https://api.github.com/repos/teamsnap/emque-consuming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamsnap/emque-consuming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamsnap/emque-consuming/teams","hooks_url":"https://api.github.com/repos/teamsnap/emque-consuming/hooks","issue_events_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/events{/number}","events_url":"https://api.github.com/repos/teamsnap/emque-consuming/events","assignees_url":"https://api.github.com/repos/teamsnap/emque-consuming/assignees{/user}","branches_url":"https://api.github.com/repos/teamsnap/emque-consuming/branches{/branch}","tags_url":"https://api.github.com/repos/teamsnap/emque-consuming/tags","blobs_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamsnap/emque-consuming/statuses/{sha}","languages_url":"https://api.github.com/repos/teamsnap/emque-consuming/languages","stargazers_url":"https://api.github.com/repos/teamsnap/emque-consuming/stargazers","contributors_url":"https://api.github.com/repos/teamsnap/emque-consuming/contributors","subscribers_url":"https://api.github.com/repos/teamsnap/emque-consuming/subscribers","subscription_url":"https://api.github.com/repos/teamsnap/emque-consuming/subscription","commits_url":"https://api.github.com/repos/teamsnap/emque-consuming/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamsnap/emque-consuming/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/comments/{number}","contents_url":"https://api.github.com/repos/teamsnap/emque-consuming/contents/{+path}","compare_url":"https://api.github.com/repos/teamsnap/emque-consuming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamsnap/emque-consuming/merges","archive_url":"https://api.github.com/repos/teamsnap/emque-consuming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamsnap/emque-consuming/downloads","issues_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues{/number}","pulls_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls{/number}","milestones_url":"https://api.github.com/repos/teamsnap/emque-consuming/milestones{/number}","notifications_url":"https://api.github.com/repos/teamsnap/emque-consuming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamsnap/emque-consuming/labels{/name}","releases_url":"https://api.github.com/repos/teamsnap/emque-consuming/releases{/id}","created_at":"2014-09-15T11:20:37Z","updated_at":"2014-09-21T18:39:47Z","pushed_at":"2014-11-06T20:47:47Z","git_url":"git://github.com/teamsnap/emque-consuming.git","ssh_url":"git@github.com:teamsnap/emque-consuming.git","clone_url":"https://github.com/teamsnap/emque-consuming.git","svn_url":"https://github.com/teamsnap/emque-consuming","homepage":null,"size":690,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"teamsnap:master","ref":"master","sha":"78e5b9916070b88e08d7a0244cefea7e1769c4f4","user":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=2","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"repo":{"id":24053614,"name":"emque-consuming","full_name":"teamsnap/emque-consuming","owner":{"login":"teamsnap","id":69031,"avatar_url":"https://avatars.githubusercontent.com/u/69031?v=2","gravatar_id":"","url":"https://api.github.com/users/teamsnap","html_url":"https://github.com/teamsnap","followers_url":"https://api.github.com/users/teamsnap/followers","following_url":"https://api.github.com/users/teamsnap/following{/other_user}","gists_url":"https://api.github.com/users/teamsnap/gists{/gist_id}","starred_url":"https://api.github.com/users/teamsnap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamsnap/subscriptions","organizations_url":"https://api.github.com/users/teamsnap/orgs","repos_url":"https://api.github.com/users/teamsnap/repos","events_url":"https://api.github.com/users/teamsnap/events{/privacy}","received_events_url":"https://api.github.com/users/teamsnap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamsnap/emque-consuming","description":"A layer on top of poseidon-cluster for consuming kafka messages generated by emque-producing","fork":false,"url":"https://api.github.com/repos/teamsnap/emque-consuming","forks_url":"https://api.github.com/repos/teamsnap/emque-consuming/forks","keys_url":"https://api.github.com/repos/teamsnap/emque-consuming/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamsnap/emque-consuming/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamsnap/emque-consuming/teams","hooks_url":"https://api.github.com/repos/teamsnap/emque-consuming/hooks","issue_events_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/events{/number}","events_url":"https://api.github.com/repos/teamsnap/emque-consuming/events","assignees_url":"https://api.github.com/repos/teamsnap/emque-consuming/assignees{/user}","branches_url":"https://api.github.com/repos/teamsnap/emque-consuming/branches{/branch}","tags_url":"https://api.github.com/repos/teamsnap/emque-consuming/tags","blobs_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamsnap/emque-consuming/statuses/{sha}","languages_url":"https://api.github.com/repos/teamsnap/emque-consuming/languages","stargazers_url":"https://api.github.com/repos/teamsnap/emque-consuming/stargazers","contributors_url":"https://api.github.com/repos/teamsnap/emque-consuming/contributors","subscribers_url":"https://api.github.com/repos/teamsnap/emque-consuming/subscribers","subscription_url":"https://api.github.com/repos/teamsnap/emque-consuming/subscription","commits_url":"https://api.github.com/repos/teamsnap/emque-consuming/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamsnap/emque-consuming/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamsnap/emque-consuming/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues/comments/{number}","contents_url":"https://api.github.com/repos/teamsnap/emque-consuming/contents/{+path}","compare_url":"https://api.github.com/repos/teamsnap/emque-consuming/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamsnap/emque-consuming/merges","archive_url":"https://api.github.com/repos/teamsnap/emque-consuming/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamsnap/emque-consuming/downloads","issues_url":"https://api.github.com/repos/teamsnap/emque-consuming/issues{/number}","pulls_url":"https://api.github.com/repos/teamsnap/emque-consuming/pulls{/number}","milestones_url":"https://api.github.com/repos/teamsnap/emque-consuming/milestones{/number}","notifications_url":"https://api.github.com/repos/teamsnap/emque-consuming/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamsnap/emque-consuming/labels{/name}","releases_url":"https://api.github.com/repos/teamsnap/emque-consuming/releases{/id}","created_at":"2014-09-15T11:20:37Z","updated_at":"2014-09-21T18:39:47Z","pushed_at":"2014-11-06T20:47:47Z","git_url":"git://github.com/teamsnap/emque-consuming.git","ssh_url":"git@github.com:teamsnap/emque-consuming.git","clone_url":"https://github.com/teamsnap/emque-consuming.git","svn_url":"https://github.com/teamsnap/emque-consuming","homepage":null,"size":690,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14"},"html":{"href":"https://github.com/teamsnap/emque-consuming/pull/14"},"issue":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/issues/14"},"comments":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/teamsnap/emque-consuming/statuses/3de9c2dcfde4d0ccb62d80ac44d136146110122f"}}}}