{"action":"created","comment":{"url":"https://api.github.com/repos/rougeth/bottery/pulls/comments/227585769","pull_request_review_id":167662285,"id":227585769,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzU4NTc2OQ==","diff_hunk":"@@ -104,5 +104,5 @@ def run(self, server_port):\n         self.loop.run_forever()\n \n     def stop(self):\n-        self.session.close()\n-        self.loop.close()\n+        asyncio.gather(self.session.close())","path":"bottery/bottery.py","position":6,"original_position":6,"commit_id":"4ddefff160ce5c9938efcb435a9c89fd8900b718","original_commit_id":"4ddefff160ce5c9938efcb435a9c89fd8900b718","user":{"login":"kaduev13","id":3984307,"node_id":"MDQ6VXNlcjM5ODQzMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3984307?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduev13","html_url":"https://github.com/kaduev13","followers_url":"https://api.github.com/users/kaduev13/followers","following_url":"https://api.github.com/users/kaduev13/following{/other_user}","gists_url":"https://api.github.com/users/kaduev13/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduev13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduev13/subscriptions","organizations_url":"https://api.github.com/users/kaduev13/orgs","repos_url":"https://api.github.com/users/kaduev13/repos","events_url":"https://api.github.com/users/kaduev13/events{/privacy}","received_events_url":"https://api.github.com/users/kaduev13/received_events","type":"User","site_admin":false},"body":"Because `run_until_complete` will try to invoke `.run_forever` on existing (and in some cases already running) loop. It causes an exception `RuntimeError: This event loop is already running`.","created_at":"2018-10-23T22:19:28Z","updated_at":"2018-10-23T22:19:28Z","html_url":"https://github.com/rougeth/bottery/pull/181#discussion_r227585769","pull_request_url":"https://api.github.com/repos/rougeth/bottery/pulls/181","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/comments/227585769"},"html":{"href":"https://github.com/rougeth/bottery/pull/181#discussion_r227585769"},"pull_request":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/181"}},"in_reply_to_id":227585036},"pull_request":{"url":"https://api.github.com/repos/rougeth/bottery/pulls/181","id":225204168,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MjA0MTY4","html_url":"https://github.com/rougeth/bottery/pull/181","diff_url":"https://github.com/rougeth/bottery/pull/181.diff","patch_url":"https://github.com/rougeth/bottery/pull/181.patch","issue_url":"https://api.github.com/repos/rougeth/bottery/issues/181","number":181,"state":"open","locked":false,"title":"#175: Changed Bottery.stop behavior.","user":{"login":"kaduev13","id":3984307,"node_id":"MDQ6VXNlcjM5ODQzMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3984307?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduev13","html_url":"https://github.com/kaduev13","followers_url":"https://api.github.com/users/kaduev13/followers","following_url":"https://api.github.com/users/kaduev13/following{/other_user}","gists_url":"https://api.github.com/users/kaduev13/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduev13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduev13/subscriptions","organizations_url":"https://api.github.com/users/kaduev13/orgs","repos_url":"https://api.github.com/users/kaduev13/repos","events_url":"https://api.github.com/users/kaduev13/events{/privacy}","received_events_url":"https://api.github.com/users/kaduev13/received_events","type":"User","site_admin":false},"body":"This patch fixes two problems in the Bottery.stop behavior:\r\n\r\n1. `self.session.close()` was not awaited;\r\n2. `self.loop.close()` causes an exception \"Can not close running loop\" in some cases.\r\n\r\nCloses: #175\r\n","created_at":"2018-10-23T22:12:27Z","updated_at":"2018-10-23T22:19:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83e3d39290e8a92100c8217d6d131b37d1bab32d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rougeth/bottery/pulls/181/commits","review_comments_url":"https://api.github.com/repos/rougeth/bottery/pulls/181/comments","review_comment_url":"https://api.github.com/repos/rougeth/bottery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rougeth/bottery/issues/181/comments","statuses_url":"https://api.github.com/repos/rougeth/bottery/statuses/4ddefff160ce5c9938efcb435a9c89fd8900b718","head":{"label":"kaduev13:175-bottery-stop-improvements","ref":"175-bottery-stop-improvements","sha":"4ddefff160ce5c9938efcb435a9c89fd8900b718","user":{"login":"kaduev13","id":3984307,"node_id":"MDQ6VXNlcjM5ODQzMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3984307?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduev13","html_url":"https://github.com/kaduev13","followers_url":"https://api.github.com/users/kaduev13/followers","following_url":"https://api.github.com/users/kaduev13/following{/other_user}","gists_url":"https://api.github.com/users/kaduev13/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduev13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduev13/subscriptions","organizations_url":"https://api.github.com/users/kaduev13/orgs","repos_url":"https://api.github.com/users/kaduev13/repos","events_url":"https://api.github.com/users/kaduev13/events{/privacy}","received_events_url":"https://api.github.com/users/kaduev13/received_events","type":"User","site_admin":false},"repo":{"id":154194113,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQxOTQxMTM=","name":"bottery","full_name":"kaduev13/bottery","private":false,"owner":{"login":"kaduev13","id":3984307,"node_id":"MDQ6VXNlcjM5ODQzMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/3984307?v=4","gravatar_id":"","url":"https://api.github.com/users/kaduev13","html_url":"https://github.com/kaduev13","followers_url":"https://api.github.com/users/kaduev13/followers","following_url":"https://api.github.com/users/kaduev13/following{/other_user}","gists_url":"https://api.github.com/users/kaduev13/gists{/gist_id}","starred_url":"https://api.github.com/users/kaduev13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaduev13/subscriptions","organizations_url":"https://api.github.com/users/kaduev13/orgs","repos_url":"https://api.github.com/users/kaduev13/repos","events_url":"https://api.github.com/users/kaduev13/events{/privacy}","received_events_url":"https://api.github.com/users/kaduev13/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kaduev13/bottery","description":":battery: A bot framework with batteries included","fork":true,"url":"https://api.github.com/repos/kaduev13/bottery","forks_url":"https://api.github.com/repos/kaduev13/bottery/forks","keys_url":"https://api.github.com/repos/kaduev13/bottery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaduev13/bottery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaduev13/bottery/teams","hooks_url":"https://api.github.com/repos/kaduev13/bottery/hooks","issue_events_url":"https://api.github.com/repos/kaduev13/bottery/issues/events{/number}","events_url":"https://api.github.com/repos/kaduev13/bottery/events","assignees_url":"https://api.github.com/repos/kaduev13/bottery/assignees{/user}","branches_url":"https://api.github.com/repos/kaduev13/bottery/branches{/branch}","tags_url":"https://api.github.com/repos/kaduev13/bottery/tags","blobs_url":"https://api.github.com/repos/kaduev13/bottery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaduev13/bottery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaduev13/bottery/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaduev13/bottery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaduev13/bottery/statuses/{sha}","languages_url":"https://api.github.com/repos/kaduev13/bottery/languages","stargazers_url":"https://api.github.com/repos/kaduev13/bottery/stargazers","contributors_url":"https://api.github.com/repos/kaduev13/bottery/contributors","subscribers_url":"https://api.github.com/repos/kaduev13/bottery/subscribers","subscription_url":"https://api.github.com/repos/kaduev13/bottery/subscription","commits_url":"https://api.github.com/repos/kaduev13/bottery/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaduev13/bottery/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaduev13/bottery/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaduev13/bottery/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaduev13/bottery/contents/{+path}","compare_url":"https://api.github.com/repos/kaduev13/bottery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaduev13/bottery/merges","archive_url":"https://api.github.com/repos/kaduev13/bottery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaduev13/bottery/downloads","issues_url":"https://api.github.com/repos/kaduev13/bottery/issues{/number}","pulls_url":"https://api.github.com/repos/kaduev13/bottery/pulls{/number}","milestones_url":"https://api.github.com/repos/kaduev13/bottery/milestones{/number}","notifications_url":"https://api.github.com/repos/kaduev13/bottery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaduev13/bottery/labels{/name}","releases_url":"https://api.github.com/repos/kaduev13/bottery/releases{/id}","deployments_url":"https://api.github.com/repos/kaduev13/bottery/deployments","created_at":"2018-10-22T18:23:44Z","updated_at":"2018-10-22T18:23:47Z","pushed_at":"2018-10-23T22:11:08Z","git_url":"git://github.com/kaduev13/bottery.git","ssh_url":"git@github.com:kaduev13/bottery.git","clone_url":"https://github.com/kaduev13/bottery.git","svn_url":"https://github.com/kaduev13/bottery","homepage":"http://docs.bottery.io","size":436,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rougeth:master","ref":"master","sha":"52f7142d9a7bd8abda57263e092ab981d3fd6029","user":{"login":"rougeth","id":431892,"node_id":"MDQ6VXNlcjQzMTg5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/431892?v=4","gravatar_id":"","url":"https://api.github.com/users/rougeth","html_url":"https://github.com/rougeth","followers_url":"https://api.github.com/users/rougeth/followers","following_url":"https://api.github.com/users/rougeth/following{/other_user}","gists_url":"https://api.github.com/users/rougeth/gists{/gist_id}","starred_url":"https://api.github.com/users/rougeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rougeth/subscriptions","organizations_url":"https://api.github.com/users/rougeth/orgs","repos_url":"https://api.github.com/users/rougeth/repos","events_url":"https://api.github.com/users/rougeth/events{/privacy}","received_events_url":"https://api.github.com/users/rougeth/received_events","type":"User","site_admin":false},"repo":{"id":89957260,"node_id":"MDEwOlJlcG9zaXRvcnk4OTk1NzI2MA==","name":"bottery","full_name":"rougeth/bottery","private":false,"owner":{"login":"rougeth","id":431892,"node_id":"MDQ6VXNlcjQzMTg5Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/431892?v=4","gravatar_id":"","url":"https://api.github.com/users/rougeth","html_url":"https://github.com/rougeth","followers_url":"https://api.github.com/users/rougeth/followers","following_url":"https://api.github.com/users/rougeth/following{/other_user}","gists_url":"https://api.github.com/users/rougeth/gists{/gist_id}","starred_url":"https://api.github.com/users/rougeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rougeth/subscriptions","organizations_url":"https://api.github.com/users/rougeth/orgs","repos_url":"https://api.github.com/users/rougeth/repos","events_url":"https://api.github.com/users/rougeth/events{/privacy}","received_events_url":"https://api.github.com/users/rougeth/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rougeth/bottery","description":":battery: A bot framework with batteries included","fork":false,"url":"https://api.github.com/repos/rougeth/bottery","forks_url":"https://api.github.com/repos/rougeth/bottery/forks","keys_url":"https://api.github.com/repos/rougeth/bottery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rougeth/bottery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rougeth/bottery/teams","hooks_url":"https://api.github.com/repos/rougeth/bottery/hooks","issue_events_url":"https://api.github.com/repos/rougeth/bottery/issues/events{/number}","events_url":"https://api.github.com/repos/rougeth/bottery/events","assignees_url":"https://api.github.com/repos/rougeth/bottery/assignees{/user}","branches_url":"https://api.github.com/repos/rougeth/bottery/branches{/branch}","tags_url":"https://api.github.com/repos/rougeth/bottery/tags","blobs_url":"https://api.github.com/repos/rougeth/bottery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rougeth/bottery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rougeth/bottery/git/refs{/sha}","trees_url":"https://api.github.com/repos/rougeth/bottery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rougeth/bottery/statuses/{sha}","languages_url":"https://api.github.com/repos/rougeth/bottery/languages","stargazers_url":"https://api.github.com/repos/rougeth/bottery/stargazers","contributors_url":"https://api.github.com/repos/rougeth/bottery/contributors","subscribers_url":"https://api.github.com/repos/rougeth/bottery/subscribers","subscription_url":"https://api.github.com/repos/rougeth/bottery/subscription","commits_url":"https://api.github.com/repos/rougeth/bottery/commits{/sha}","git_commits_url":"https://api.github.com/repos/rougeth/bottery/git/commits{/sha}","comments_url":"https://api.github.com/repos/rougeth/bottery/comments{/number}","issue_comment_url":"https://api.github.com/repos/rougeth/bottery/issues/comments{/number}","contents_url":"https://api.github.com/repos/rougeth/bottery/contents/{+path}","compare_url":"https://api.github.com/repos/rougeth/bottery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rougeth/bottery/merges","archive_url":"https://api.github.com/repos/rougeth/bottery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rougeth/bottery/downloads","issues_url":"https://api.github.com/repos/rougeth/bottery/issues{/number}","pulls_url":"https://api.github.com/repos/rougeth/bottery/pulls{/number}","milestones_url":"https://api.github.com/repos/rougeth/bottery/milestones{/number}","notifications_url":"https://api.github.com/repos/rougeth/bottery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rougeth/bottery/labels{/name}","releases_url":"https://api.github.com/repos/rougeth/bottery/releases{/id}","deployments_url":"https://api.github.com/repos/rougeth/bottery/deployments","created_at":"2017-05-01T19:49:59Z","updated_at":"2018-10-22T12:23:48Z","pushed_at":"2018-10-23T22:12:27Z","git_url":"git://github.com/rougeth/bottery.git","ssh_url":"git@github.com:rougeth/bottery.git","clone_url":"https://github.com/rougeth/bottery.git","svn_url":"https://github.com/rougeth/bottery","homepage":"http://docs.bottery.io","size":434,"stargazers_count":207,"watchers_count":207,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":56,"open_issues":33,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/181"},"html":{"href":"https://github.com/rougeth/bottery/pull/181"},"issue":{"href":"https://api.github.com/repos/rougeth/bottery/issues/181"},"comments":{"href":"https://api.github.com/repos/rougeth/bottery/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rougeth/bottery/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/rougeth/bottery/statuses/4ddefff160ce5c9938efcb435a9c89fd8900b718"}},"author_association":"NONE"}}
{"actor":{"display_login":"kaduev13"}}