{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/89876702","pull_request_review_id":10407556,"id":89876702,"diff_hunk":"@@ -100,3 +102,42 @@ def handle_worker_offline(event):\n     msg = _(\"Worker '%(worker_name)s' shutdown\") % event_info\n     _logger.info(msg)\n     delete_worker(event_info['worker_name'], normal_shutdown=True)\n+\n+\n+def delete_worker(name, normal_shutdown=False):\n+    \"\"\"\n+    Delete the Worker with name from the database, cancel any associated tasks and reservations\n+\n+    If the worker shutdown normally, no message is logged, otherwise an error level message is\n+    logged. Default is to assume the worker did not shut down normally.\n+\n+    Any resource reservations associated with this worker are cleaned up by this function.\n+\n+    Any tasks associated with this worker are explicitly canceled.\n+\n+    :param name:            The name of the worker you wish to delete.","path":"tasking/pulp/tasking/services/worker_watcher.py","position":30,"original_position":30,"commit_id":"c65ca7d64300cbf7bfcc73f088aa996ff4bf3c7c","original_commit_id":"c65ca7d64300cbf7bfcc73f088aa996ff4bf3c7c","user":{"login":"bmbouter","id":180319,"avatar_url":"https://avatars.githubusercontent.com/u/180319?v=3","gravatar_id":"","url":"https://api.github.com/users/bmbouter","html_url":"https://github.com/bmbouter","followers_url":"https://api.github.com/users/bmbouter/followers","following_url":"https://api.github.com/users/bmbouter/following{/other_user}","gists_url":"https://api.github.com/users/bmbouter/gists{/gist_id}","starred_url":"https://api.github.com/users/bmbouter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmbouter/subscriptions","organizations_url":"https://api.github.com/users/bmbouter/orgs","repos_url":"https://api.github.com/users/bmbouter/repos","events_url":"https://api.github.com/users/bmbouter/events{/privacy}","received_events_url":"https://api.github.com/users/bmbouter/received_events","type":"User","site_admin":false},"body":"This should be converted to use the new Google style docstring","created_at":"2016-11-28T20:26:03Z","updated_at":"2016-11-28T20:26:03Z","html_url":"https://github.com/pulp/pulp/pull/2862#discussion_r89876702","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2862","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/89876702"},"html":{"href":"https://github.com/pulp/pulp/pull/2862#discussion_r89876702"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2862"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2862","id":95039673,"html_url":"https://github.com/pulp/pulp/pull/2862","diff_url":"https://github.com/pulp/pulp/pull/2862.diff","patch_url":"https://github.com/pulp/pulp/pull/2862.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2862","number":2862,"state":"open","locked":false,"title":"[WIP] Example layout","user":{"login":"mhrivnak","id":53091,"avatar_url":"https://avatars.githubusercontent.com/u/53091?v=3","gravatar_id":"","url":"https://api.github.com/users/mhrivnak","html_url":"https://github.com/mhrivnak","followers_url":"https://api.github.com/users/mhrivnak/followers","following_url":"https://api.github.com/users/mhrivnak/following{/other_user}","gists_url":"https://api.github.com/users/mhrivnak/gists{/gist_id}","starred_url":"https://api.github.com/users/mhrivnak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhrivnak/subscriptions","organizations_url":"https://api.github.com/users/mhrivnak/orgs","repos_url":"https://api.github.com/users/mhrivnak/repos","events_url":"https://api.github.com/users/mhrivnak/events{/privacy}","received_events_url":"https://api.github.com/users/mhrivnak/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-23T16:43:55Z","updated_at":"2016-11-28T20:26:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f2f3b2c3559af56c4a172b91fb4ea0a11c426bc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2862/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2862/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2862/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/c65ca7d64300cbf7bfcc73f088aa996ff4bf3c7c","head":{"label":"mhrivnak:example-layout","ref":"example-layout","sha":"c65ca7d64300cbf7bfcc73f088aa996ff4bf3c7c","user":{"login":"mhrivnak","id":53091,"avatar_url":"https://avatars.githubusercontent.com/u/53091?v=3","gravatar_id":"","url":"https://api.github.com/users/mhrivnak","html_url":"https://github.com/mhrivnak","followers_url":"https://api.github.com/users/mhrivnak/followers","following_url":"https://api.github.com/users/mhrivnak/following{/other_user}","gists_url":"https://api.github.com/users/mhrivnak/gists{/gist_id}","starred_url":"https://api.github.com/users/mhrivnak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhrivnak/subscriptions","organizations_url":"https://api.github.com/users/mhrivnak/orgs","repos_url":"https://api.github.com/users/mhrivnak/repos","events_url":"https://api.github.com/users/mhrivnak/events{/privacy}","received_events_url":"https://api.github.com/users/mhrivnak/received_events","type":"User","site_admin":false},"repo":{"id":26452639,"name":"pulp","full_name":"mhrivnak/pulp","owner":{"login":"mhrivnak","id":53091,"avatar_url":"https://avatars.githubusercontent.com/u/53091?v=3","gravatar_id":"","url":"https://api.github.com/users/mhrivnak","html_url":"https://github.com/mhrivnak","followers_url":"https://api.github.com/users/mhrivnak/followers","following_url":"https://api.github.com/users/mhrivnak/following{/other_user}","gists_url":"https://api.github.com/users/mhrivnak/gists{/gist_id}","starred_url":"https://api.github.com/users/mhrivnak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhrivnak/subscriptions","organizations_url":"https://api.github.com/users/mhrivnak/orgs","repos_url":"https://api.github.com/users/mhrivnak/repos","events_url":"https://api.github.com/users/mhrivnak/events{/privacy}","received_events_url":"https://api.github.com/users/mhrivnak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhrivnak/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":true,"url":"https://api.github.com/repos/mhrivnak/pulp","forks_url":"https://api.github.com/repos/mhrivnak/pulp/forks","keys_url":"https://api.github.com/repos/mhrivnak/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhrivnak/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhrivnak/pulp/teams","hooks_url":"https://api.github.com/repos/mhrivnak/pulp/hooks","issue_events_url":"https://api.github.com/repos/mhrivnak/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/mhrivnak/pulp/events","assignees_url":"https://api.github.com/repos/mhrivnak/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/mhrivnak/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/mhrivnak/pulp/tags","blobs_url":"https://api.github.com/repos/mhrivnak/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhrivnak/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhrivnak/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhrivnak/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhrivnak/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/mhrivnak/pulp/languages","stargazers_url":"https://api.github.com/repos/mhrivnak/pulp/stargazers","contributors_url":"https://api.github.com/repos/mhrivnak/pulp/contributors","subscribers_url":"https://api.github.com/repos/mhrivnak/pulp/subscribers","subscription_url":"https://api.github.com/repos/mhrivnak/pulp/subscription","commits_url":"https://api.github.com/repos/mhrivnak/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhrivnak/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhrivnak/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhrivnak/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhrivnak/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/mhrivnak/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhrivnak/pulp/merges","archive_url":"https://api.github.com/repos/mhrivnak/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhrivnak/pulp/downloads","issues_url":"https://api.github.com/repos/mhrivnak/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/mhrivnak/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/mhrivnak/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/mhrivnak/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhrivnak/pulp/labels{/name}","releases_url":"https://api.github.com/repos/mhrivnak/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/mhrivnak/pulp/deployments","created_at":"2014-11-10T19:48:37Z","updated_at":"2015-04-15T19:25:36Z","pushed_at":"2016-11-28T20:17:35Z","git_url":"git://github.com/mhrivnak/pulp.git","ssh_url":"git@github.com:mhrivnak/pulp.git","clone_url":"https://github.com/mhrivnak/pulp.git","svn_url":"https://github.com/mhrivnak/pulp","homepage":"","size":93401,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"pulp:3.0-dev","ref":"3.0-dev","sha":"ba91a3efa0cab7b674b1b6e88832989db8ecdd16","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","deployments_url":"https://api.github.com/repos/pulp/pulp/deployments","created_at":"2012-08-06T13:49:20Z","updated_at":"2016-11-18T21:39:25Z","pushed_at":"2016-11-28T20:17:35Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":103503,"stargazers_count":287,"watchers_count":287,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":18,"forks":112,"open_issues":18,"watchers":287,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2862"},"html":{"href":"https://github.com/pulp/pulp/pull/2862"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2862"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2862/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2862/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2862/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/c65ca7d64300cbf7bfcc73f088aa996ff4bf3c7c"}}}}
{"actor":{"display_login":"bmbouter"}}