{"action":"created","comment":{"url":"https://api.github.com/repos/box/ClusterRunner/pulls/comments/28355823","id":28355823,"diff_hunk":"@@ -253,3 +255,15 @@ def get(self):\n         self.write({\n             'events': analytics.get_events(since_timestamp, since_id),\n         })\n+\n+\n+class _SlaveShutdownHandler(_ClusterMasterBaseHandler):\n+    @authenticated\n+    def post(self):\n+        shutdown_all = self.decoded_body.get('shutdown_all')\n+        slaves_to_shutdown = self._cluster_master.all_slaves_by_id().keys() if shutdown_all else\\\n+            [int(slave_id) for slave_id in self.decoded_body.get('slaves')]\n+\n+        for slave_id in slaves_to_shutdown:\n+            slave = self._cluster_master.get_slave(slave_id)","path":"app/web_framework/cluster_master_application.py","position":32,"original_position":32,"commit_id":"bb19d7ceb1126c221ebf72a79083f122b1217178","original_commit_id":"bb19d7ceb1126c221ebf72a79083f122b1217178","user":{"login":"tjlee0909","id":3615089,"avatar_url":"https://avatars.githubusercontent.com/u/3615089?v=3","gravatar_id":"","url":"https://api.github.com/users/tjlee0909","html_url":"https://github.com/tjlee0909","followers_url":"https://api.github.com/users/tjlee0909/followers","following_url":"https://api.github.com/users/tjlee0909/following{/other_user}","gists_url":"https://api.github.com/users/tjlee0909/gists{/gist_id}","starred_url":"https://api.github.com/users/tjlee0909/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjlee0909/subscriptions","organizations_url":"https://api.github.com/users/tjlee0909/orgs","repos_url":"https://api.github.com/users/tjlee0909/repos","events_url":"https://api.github.com/users/tjlee0909/events{/privacy}","received_events_url":"https://api.github.com/users/tjlee0909/received_events","type":"User","site_admin":false},"body":"@josephharrington nope, I was saying that I thought the current behavior was to 500, but I didn't know that an ItemNotFoundError exception translated into a 404.","created_at":"2015-04-14T18:31:27Z","updated_at":"2015-04-14T18:31:27Z","html_url":"https://github.com/box/ClusterRunner/pull/118#discussion_r28355823","pull_request_url":"https://api.github.com/repos/box/ClusterRunner/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/comments/28355823"},"html":{"href":"https://github.com/box/ClusterRunner/pull/118#discussion_r28355823"},"pull_request":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/box/ClusterRunner/pulls/118","id":32921085,"html_url":"https://github.com/box/ClusterRunner/pull/118","diff_url":"https://github.com/box/ClusterRunner/pull/118.diff","patch_url":"https://github.com/box/ClusterRunner/pull/118.patch","issue_url":"https://api.github.com/repos/box/ClusterRunner/issues/118","number":118,"state":"open","locked":false,"title":"Add shutdown mode for slaves","user":{"login":"drobertduke","id":905655,"avatar_url":"https://avatars.githubusercontent.com/u/905655?v=3","gravatar_id":"","url":"https://api.github.com/users/drobertduke","html_url":"https://github.com/drobertduke","followers_url":"https://api.github.com/users/drobertduke/followers","following_url":"https://api.github.com/users/drobertduke/following{/other_user}","gists_url":"https://api.github.com/users/drobertduke/gists{/gist_id}","starred_url":"https://api.github.com/users/drobertduke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drobertduke/subscriptions","organizations_url":"https://api.github.com/users/drobertduke/orgs","repos_url":"https://api.github.com/users/drobertduke/repos","events_url":"https://api.github.com/users/drobertduke/events{/privacy}","received_events_url":"https://api.github.com/users/drobertduke/received_events","type":"User","site_admin":false},"body":"- Slaves now have a shutdown mode where they will not accept\r\nadditional subjobs.  The slave process will terminate when all\r\nexecutors are free.\r\n- The master now provides an API for shutting down a named set of\r\nslaves or shutting down all slaves.\r\n- Adds shutdown functionality to the client and the command line.\r\n- This commit also adds missing test coverage to slave_allocator\r\nand slave.","created_at":"2015-04-09T02:49:25Z","updated_at":"2015-04-14T18:31:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77f09fd10709dd37ecf26a8fff13f89ef1d3b8a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/box/ClusterRunner/pulls/118/commits","review_comments_url":"https://api.github.com/repos/box/ClusterRunner/pulls/118/comments","review_comment_url":"https://api.github.com/repos/box/ClusterRunner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/box/ClusterRunner/issues/118/comments","statuses_url":"https://api.github.com/repos/box/ClusterRunner/statuses/bb19d7ceb1126c221ebf72a79083f122b1217178","head":{"label":"box:add_safe_slave_disconnector_route","ref":"add_safe_slave_disconnector_route","sha":"bb19d7ceb1126c221ebf72a79083f122b1217178","user":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"repo":{"id":25371175,"name":"ClusterRunner","full_name":"box/ClusterRunner","owner":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/box/ClusterRunner","description":"ClusterRunner makes it easy to execute test-suites across your infrastructure in the fastest and most efficient way possible.","fork":false,"url":"https://api.github.com/repos/box/ClusterRunner","forks_url":"https://api.github.com/repos/box/ClusterRunner/forks","keys_url":"https://api.github.com/repos/box/ClusterRunner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/box/ClusterRunner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/box/ClusterRunner/teams","hooks_url":"https://api.github.com/repos/box/ClusterRunner/hooks","issue_events_url":"https://api.github.com/repos/box/ClusterRunner/issues/events{/number}","events_url":"https://api.github.com/repos/box/ClusterRunner/events","assignees_url":"https://api.github.com/repos/box/ClusterRunner/assignees{/user}","branches_url":"https://api.github.com/repos/box/ClusterRunner/branches{/branch}","tags_url":"https://api.github.com/repos/box/ClusterRunner/tags","blobs_url":"https://api.github.com/repos/box/ClusterRunner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/box/ClusterRunner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/box/ClusterRunner/git/refs{/sha}","trees_url":"https://api.github.com/repos/box/ClusterRunner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/box/ClusterRunner/statuses/{sha}","languages_url":"https://api.github.com/repos/box/ClusterRunner/languages","stargazers_url":"https://api.github.com/repos/box/ClusterRunner/stargazers","contributors_url":"https://api.github.com/repos/box/ClusterRunner/contributors","subscribers_url":"https://api.github.com/repos/box/ClusterRunner/subscribers","subscription_url":"https://api.github.com/repos/box/ClusterRunner/subscription","commits_url":"https://api.github.com/repos/box/ClusterRunner/commits{/sha}","git_commits_url":"https://api.github.com/repos/box/ClusterRunner/git/commits{/sha}","comments_url":"https://api.github.com/repos/box/ClusterRunner/comments{/number}","issue_comment_url":"https://api.github.com/repos/box/ClusterRunner/issues/comments{/number}","contents_url":"https://api.github.com/repos/box/ClusterRunner/contents/{+path}","compare_url":"https://api.github.com/repos/box/ClusterRunner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/box/ClusterRunner/merges","archive_url":"https://api.github.com/repos/box/ClusterRunner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/box/ClusterRunner/downloads","issues_url":"https://api.github.com/repos/box/ClusterRunner/issues{/number}","pulls_url":"https://api.github.com/repos/box/ClusterRunner/pulls{/number}","milestones_url":"https://api.github.com/repos/box/ClusterRunner/milestones{/number}","notifications_url":"https://api.github.com/repos/box/ClusterRunner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/box/ClusterRunner/labels{/name}","releases_url":"https://api.github.com/repos/box/ClusterRunner/releases{/id}","created_at":"2014-10-17T18:20:39Z","updated_at":"2015-04-14T17:59:24Z","pushed_at":"2015-04-14T17:59:24Z","git_url":"git://github.com/box/ClusterRunner.git","ssh_url":"git@github.com:box/ClusterRunner.git","clone_url":"https://github.com/box/ClusterRunner.git","svn_url":"https://github.com/box/ClusterRunner","homepage":"http://clusterrunner.com","size":7319,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":14,"forks":6,"open_issues":14,"watchers":43,"default_branch":"master"}},"base":{"label":"box:master","ref":"master","sha":"0e4763c022c24d8c89c7940d057c61116c010bc9","user":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"repo":{"id":25371175,"name":"ClusterRunner","full_name":"box/ClusterRunner","owner":{"login":"box","id":23900,"avatar_url":"https://avatars.githubusercontent.com/u/23900?v=3","gravatar_id":"","url":"https://api.github.com/users/box","html_url":"https://github.com/box","followers_url":"https://api.github.com/users/box/followers","following_url":"https://api.github.com/users/box/following{/other_user}","gists_url":"https://api.github.com/users/box/gists{/gist_id}","starred_url":"https://api.github.com/users/box/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box/subscriptions","organizations_url":"https://api.github.com/users/box/orgs","repos_url":"https://api.github.com/users/box/repos","events_url":"https://api.github.com/users/box/events{/privacy}","received_events_url":"https://api.github.com/users/box/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/box/ClusterRunner","description":"ClusterRunner makes it easy to execute test-suites across your infrastructure in the fastest and most efficient way possible.","fork":false,"url":"https://api.github.com/repos/box/ClusterRunner","forks_url":"https://api.github.com/repos/box/ClusterRunner/forks","keys_url":"https://api.github.com/repos/box/ClusterRunner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/box/ClusterRunner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/box/ClusterRunner/teams","hooks_url":"https://api.github.com/repos/box/ClusterRunner/hooks","issue_events_url":"https://api.github.com/repos/box/ClusterRunner/issues/events{/number}","events_url":"https://api.github.com/repos/box/ClusterRunner/events","assignees_url":"https://api.github.com/repos/box/ClusterRunner/assignees{/user}","branches_url":"https://api.github.com/repos/box/ClusterRunner/branches{/branch}","tags_url":"https://api.github.com/repos/box/ClusterRunner/tags","blobs_url":"https://api.github.com/repos/box/ClusterRunner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/box/ClusterRunner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/box/ClusterRunner/git/refs{/sha}","trees_url":"https://api.github.com/repos/box/ClusterRunner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/box/ClusterRunner/statuses/{sha}","languages_url":"https://api.github.com/repos/box/ClusterRunner/languages","stargazers_url":"https://api.github.com/repos/box/ClusterRunner/stargazers","contributors_url":"https://api.github.com/repos/box/ClusterRunner/contributors","subscribers_url":"https://api.github.com/repos/box/ClusterRunner/subscribers","subscription_url":"https://api.github.com/repos/box/ClusterRunner/subscription","commits_url":"https://api.github.com/repos/box/ClusterRunner/commits{/sha}","git_commits_url":"https://api.github.com/repos/box/ClusterRunner/git/commits{/sha}","comments_url":"https://api.github.com/repos/box/ClusterRunner/comments{/number}","issue_comment_url":"https://api.github.com/repos/box/ClusterRunner/issues/comments{/number}","contents_url":"https://api.github.com/repos/box/ClusterRunner/contents/{+path}","compare_url":"https://api.github.com/repos/box/ClusterRunner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/box/ClusterRunner/merges","archive_url":"https://api.github.com/repos/box/ClusterRunner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/box/ClusterRunner/downloads","issues_url":"https://api.github.com/repos/box/ClusterRunner/issues{/number}","pulls_url":"https://api.github.com/repos/box/ClusterRunner/pulls{/number}","milestones_url":"https://api.github.com/repos/box/ClusterRunner/milestones{/number}","notifications_url":"https://api.github.com/repos/box/ClusterRunner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/box/ClusterRunner/labels{/name}","releases_url":"https://api.github.com/repos/box/ClusterRunner/releases{/id}","created_at":"2014-10-17T18:20:39Z","updated_at":"2015-04-14T17:59:24Z","pushed_at":"2015-04-14T17:59:24Z","git_url":"git://github.com/box/ClusterRunner.git","ssh_url":"git@github.com:box/ClusterRunner.git","clone_url":"https://github.com/box/ClusterRunner.git","svn_url":"https://github.com/box/ClusterRunner","homepage":"http://clusterrunner.com","size":7319,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":14,"forks":6,"open_issues":14,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/118"},"html":{"href":"https://github.com/box/ClusterRunner/pull/118"},"issue":{"href":"https://api.github.com/repos/box/ClusterRunner/issues/118"},"comments":{"href":"https://api.github.com/repos/box/ClusterRunner/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/box/ClusterRunner/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/box/ClusterRunner/statuses/bb19d7ceb1126c221ebf72a79083f122b1217178"}}}}