{"action":"created","comment":{"url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/comments/131166512","pull_request_review_id":54121224,"id":131166512,"diff_hunk":"@@ -49,6 +58,31 @@ def disable_output_buffering\n         # Necessary for docker and integration tests\n         $stdout.sync = $stderr.sync = true\n       end\n+\n+      def handle_signals(*signals)\n+        shutting_down = false\n+        signals.each do |signal|\n+          Signal.trap(signal) do\n+            unless shutting_down\n+              shutting_down = true\n+              shutdown(signal)\n+            end\n+          end\n+        end\n+      end\n+\n+      def shutdown(signal)\n+        puts \"Signal #{signal} received. Sending exceptions to workers then shutting down.\"","path":"lib/rabbit_stew/service/runner.rb","position":61,"original_position":61,"commit_id":"da505719237d1bc59a6bcdc8b8bb05c3f1899b47","original_commit_id":"da505719237d1bc59a6bcdc8b8bb05c3f1899b47","user":{"login":"wintonpc","id":2847818,"avatar_url":"https://avatars0.githubusercontent.com/u/2847818?v=4","gravatar_id":"","url":"https://api.github.com/users/wintonpc","html_url":"https://github.com/wintonpc","followers_url":"https://api.github.com/users/wintonpc/followers","following_url":"https://api.github.com/users/wintonpc/following{/other_user}","gists_url":"https://api.github.com/users/wintonpc/gists{/gist_id}","starred_url":"https://api.github.com/users/wintonpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wintonpc/subscriptions","organizations_url":"https://api.github.com/users/wintonpc/orgs","repos_url":"https://api.github.com/users/wintonpc/repos","events_url":"https://api.github.com/users/wintonpc/events{/privacy}","received_events_url":"https://api.github.com/users/wintonpc/received_events","type":"User","site_admin":false},"body":"Should this be logatron? Or is logging unreliable at this point?","created_at":"2017-08-03T14:58:19Z","updated_at":"2017-08-03T14:58:19Z","html_url":"https://github.com/indigobio/rabbit_stew/pull/11#discussion_r131166512","pull_request_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/comments/131166512"},"html":{"href":"https://github.com/indigobio/rabbit_stew/pull/11#discussion_r131166512"},"pull_request":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11","id":133307017,"html_url":"https://github.com/indigobio/rabbit_stew/pull/11","diff_url":"https://github.com/indigobio/rabbit_stew/pull/11.diff","patch_url":"https://github.com/indigobio/rabbit_stew/pull/11.patch","issue_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/11","number":11,"state":"open","locked":false,"title":"[AR-3264] RabbitStew catches SIGTERM and SIGINT and sends SignalExcep…","user":{"login":"codyplungis","id":1347938,"avatar_url":"https://avatars1.githubusercontent.com/u/1347938?v=4","gravatar_id":"","url":"https://api.github.com/users/codyplungis","html_url":"https://github.com/codyplungis","followers_url":"https://api.github.com/users/codyplungis/followers","following_url":"https://api.github.com/users/codyplungis/following{/other_user}","gists_url":"https://api.github.com/users/codyplungis/gists{/gist_id}","starred_url":"https://api.github.com/users/codyplungis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codyplungis/subscriptions","organizations_url":"https://api.github.com/users/codyplungis/orgs","repos_url":"https://api.github.com/users/codyplungis/repos","events_url":"https://api.github.com/users/codyplungis/events{/privacy}","received_events_url":"https://api.github.com/users/codyplungis/received_events","type":"User","site_admin":false},"body":"…tion to workers\r\n\r\nWhen sending SIGTERM or SIGINT(Ctrl+c) to a daemon it would just kill the daemon and the worker threads would not get a chance to clean up. Now RabbitStew will trap the signal and send an exception to the workers allowing them die gracefully.\r\n\r\nhttps://indigobio.atlassian.net/browse/AR-3264","created_at":"2017-07-31T18:30:44Z","updated_at":"2017-08-03T14:58:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa5090d7157d56f5ca8713cb98ca7f60c83eb03b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11/commits","review_comments_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11/comments","review_comment_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/11/comments","statuses_url":"https://api.github.com/repos/indigobio/rabbit_stew/statuses/da505719237d1bc59a6bcdc8b8bb05c3f1899b47","head":{"label":"indigobio:b-terminateWorkers","ref":"b-terminateWorkers","sha":"da505719237d1bc59a6bcdc8b8bb05c3f1899b47","user":{"login":"indigobio","id":711805,"avatar_url":"https://avatars0.githubusercontent.com/u/711805?v=4","gravatar_id":"","url":"https://api.github.com/users/indigobio","html_url":"https://github.com/indigobio","followers_url":"https://api.github.com/users/indigobio/followers","following_url":"https://api.github.com/users/indigobio/following{/other_user}","gists_url":"https://api.github.com/users/indigobio/gists{/gist_id}","starred_url":"https://api.github.com/users/indigobio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indigobio/subscriptions","organizations_url":"https://api.github.com/users/indigobio/orgs","repos_url":"https://api.github.com/users/indigobio/repos","events_url":"https://api.github.com/users/indigobio/events{/privacy}","received_events_url":"https://api.github.com/users/indigobio/received_events","type":"Organization","site_admin":false},"repo":{"id":57974718,"name":"rabbit_stew","full_name":"indigobio/rabbit_stew","owner":{"login":"indigobio","id":711805,"avatar_url":"https://avatars0.githubusercontent.com/u/711805?v=4","gravatar_id":"","url":"https://api.github.com/users/indigobio","html_url":"https://github.com/indigobio","followers_url":"https://api.github.com/users/indigobio/followers","following_url":"https://api.github.com/users/indigobio/following{/other_user}","gists_url":"https://api.github.com/users/indigobio/gists{/gist_id}","starred_url":"https://api.github.com/users/indigobio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indigobio/subscriptions","organizations_url":"https://api.github.com/users/indigobio/orgs","repos_url":"https://api.github.com/users/indigobio/repos","events_url":"https://api.github.com/users/indigobio/events{/privacy}","received_events_url":"https://api.github.com/users/indigobio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indigobio/rabbit_stew","description":"Abstraction for creating AMQP daemons in Ruby","fork":false,"url":"https://api.github.com/repos/indigobio/rabbit_stew","forks_url":"https://api.github.com/repos/indigobio/rabbit_stew/forks","keys_url":"https://api.github.com/repos/indigobio/rabbit_stew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indigobio/rabbit_stew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indigobio/rabbit_stew/teams","hooks_url":"https://api.github.com/repos/indigobio/rabbit_stew/hooks","issue_events_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/events{/number}","events_url":"https://api.github.com/repos/indigobio/rabbit_stew/events","assignees_url":"https://api.github.com/repos/indigobio/rabbit_stew/assignees{/user}","branches_url":"https://api.github.com/repos/indigobio/rabbit_stew/branches{/branch}","tags_url":"https://api.github.com/repos/indigobio/rabbit_stew/tags","blobs_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/refs{/sha}","trees_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indigobio/rabbit_stew/statuses/{sha}","languages_url":"https://api.github.com/repos/indigobio/rabbit_stew/languages","stargazers_url":"https://api.github.com/repos/indigobio/rabbit_stew/stargazers","contributors_url":"https://api.github.com/repos/indigobio/rabbit_stew/contributors","subscribers_url":"https://api.github.com/repos/indigobio/rabbit_stew/subscribers","subscription_url":"https://api.github.com/repos/indigobio/rabbit_stew/subscription","commits_url":"https://api.github.com/repos/indigobio/rabbit_stew/commits{/sha}","git_commits_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/commits{/sha}","comments_url":"https://api.github.com/repos/indigobio/rabbit_stew/comments{/number}","issue_comment_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/comments{/number}","contents_url":"https://api.github.com/repos/indigobio/rabbit_stew/contents/{+path}","compare_url":"https://api.github.com/repos/indigobio/rabbit_stew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indigobio/rabbit_stew/merges","archive_url":"https://api.github.com/repos/indigobio/rabbit_stew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indigobio/rabbit_stew/downloads","issues_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues{/number}","pulls_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls{/number}","milestones_url":"https://api.github.com/repos/indigobio/rabbit_stew/milestones{/number}","notifications_url":"https://api.github.com/repos/indigobio/rabbit_stew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indigobio/rabbit_stew/labels{/name}","releases_url":"https://api.github.com/repos/indigobio/rabbit_stew/releases{/id}","deployments_url":"https://api.github.com/repos/indigobio/rabbit_stew/deployments","created_at":"2016-05-03T14:16:42Z","updated_at":"2016-05-16T14:55:45Z","pushed_at":"2017-08-03T14:31:48Z","git_url":"git://github.com/indigobio/rabbit_stew.git","ssh_url":"git@github.com:indigobio/rabbit_stew.git","clone_url":"https://github.com/indigobio/rabbit_stew.git","svn_url":"https://github.com/indigobio/rabbit_stew","homepage":null,"size":70,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"indigobio:develop","ref":"develop","sha":"45cffd007da3776d4546b5ba69e2d8ef285af32d","user":{"login":"indigobio","id":711805,"avatar_url":"https://avatars0.githubusercontent.com/u/711805?v=4","gravatar_id":"","url":"https://api.github.com/users/indigobio","html_url":"https://github.com/indigobio","followers_url":"https://api.github.com/users/indigobio/followers","following_url":"https://api.github.com/users/indigobio/following{/other_user}","gists_url":"https://api.github.com/users/indigobio/gists{/gist_id}","starred_url":"https://api.github.com/users/indigobio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indigobio/subscriptions","organizations_url":"https://api.github.com/users/indigobio/orgs","repos_url":"https://api.github.com/users/indigobio/repos","events_url":"https://api.github.com/users/indigobio/events{/privacy}","received_events_url":"https://api.github.com/users/indigobio/received_events","type":"Organization","site_admin":false},"repo":{"id":57974718,"name":"rabbit_stew","full_name":"indigobio/rabbit_stew","owner":{"login":"indigobio","id":711805,"avatar_url":"https://avatars0.githubusercontent.com/u/711805?v=4","gravatar_id":"","url":"https://api.github.com/users/indigobio","html_url":"https://github.com/indigobio","followers_url":"https://api.github.com/users/indigobio/followers","following_url":"https://api.github.com/users/indigobio/following{/other_user}","gists_url":"https://api.github.com/users/indigobio/gists{/gist_id}","starred_url":"https://api.github.com/users/indigobio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indigobio/subscriptions","organizations_url":"https://api.github.com/users/indigobio/orgs","repos_url":"https://api.github.com/users/indigobio/repos","events_url":"https://api.github.com/users/indigobio/events{/privacy}","received_events_url":"https://api.github.com/users/indigobio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indigobio/rabbit_stew","description":"Abstraction for creating AMQP daemons in Ruby","fork":false,"url":"https://api.github.com/repos/indigobio/rabbit_stew","forks_url":"https://api.github.com/repos/indigobio/rabbit_stew/forks","keys_url":"https://api.github.com/repos/indigobio/rabbit_stew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indigobio/rabbit_stew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indigobio/rabbit_stew/teams","hooks_url":"https://api.github.com/repos/indigobio/rabbit_stew/hooks","issue_events_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/events{/number}","events_url":"https://api.github.com/repos/indigobio/rabbit_stew/events","assignees_url":"https://api.github.com/repos/indigobio/rabbit_stew/assignees{/user}","branches_url":"https://api.github.com/repos/indigobio/rabbit_stew/branches{/branch}","tags_url":"https://api.github.com/repos/indigobio/rabbit_stew/tags","blobs_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/refs{/sha}","trees_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indigobio/rabbit_stew/statuses/{sha}","languages_url":"https://api.github.com/repos/indigobio/rabbit_stew/languages","stargazers_url":"https://api.github.com/repos/indigobio/rabbit_stew/stargazers","contributors_url":"https://api.github.com/repos/indigobio/rabbit_stew/contributors","subscribers_url":"https://api.github.com/repos/indigobio/rabbit_stew/subscribers","subscription_url":"https://api.github.com/repos/indigobio/rabbit_stew/subscription","commits_url":"https://api.github.com/repos/indigobio/rabbit_stew/commits{/sha}","git_commits_url":"https://api.github.com/repos/indigobio/rabbit_stew/git/commits{/sha}","comments_url":"https://api.github.com/repos/indigobio/rabbit_stew/comments{/number}","issue_comment_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues/comments{/number}","contents_url":"https://api.github.com/repos/indigobio/rabbit_stew/contents/{+path}","compare_url":"https://api.github.com/repos/indigobio/rabbit_stew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indigobio/rabbit_stew/merges","archive_url":"https://api.github.com/repos/indigobio/rabbit_stew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indigobio/rabbit_stew/downloads","issues_url":"https://api.github.com/repos/indigobio/rabbit_stew/issues{/number}","pulls_url":"https://api.github.com/repos/indigobio/rabbit_stew/pulls{/number}","milestones_url":"https://api.github.com/repos/indigobio/rabbit_stew/milestones{/number}","notifications_url":"https://api.github.com/repos/indigobio/rabbit_stew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indigobio/rabbit_stew/labels{/name}","releases_url":"https://api.github.com/repos/indigobio/rabbit_stew/releases{/id}","deployments_url":"https://api.github.com/repos/indigobio/rabbit_stew/deployments","created_at":"2016-05-03T14:16:42Z","updated_at":"2016-05-16T14:55:45Z","pushed_at":"2017-08-03T14:31:48Z","git_url":"git://github.com/indigobio/rabbit_stew.git","ssh_url":"git@github.com:indigobio/rabbit_stew.git","clone_url":"https://github.com/indigobio/rabbit_stew.git","svn_url":"https://github.com/indigobio/rabbit_stew","homepage":null,"size":70,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11"},"html":{"href":"https://github.com/indigobio/rabbit_stew/pull/11"},"issue":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/issues/11"},"comments":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/indigobio/rabbit_stew/statuses/da505719237d1bc59a6bcdc8b8bb05c3f1899b47"}}}}
{"actor":{"display_login":"wintonpc"}}