{"action":"created","comment":{"url":"https://api.github.com/repos/raiden-network/raiden/pulls/comments/214356369","pull_request_review_id":151398924,"id":214356369,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDM1NjM2OQ==","diff_hunk":"@@ -1025,8 +1035,21 @@ def _run_app(self):\n                 )\n         finally:\n             self._shutdown_hook()\n-            if api_server:\n-                api_server.stop()\n+\n+            def stop_task(task):\n+                try:\n+                    if isinstance(task, Runnable):\n+                        task.stop()\n+                    else:\n+                        task.kill()\n+                finally:\n+                    task.get()  # re-raise\n+\n+            stop_tasks = [","path":"raiden/ui/cli.py","position":87,"original_position":87,"commit_id":"b537e8432a021fe26de4d2c34f3522f43b7c8e77","original_commit_id":"b537e8432a021fe26de4d2c34f3522f43b7c8e77","user":{"login":"andrevmatos","id":587021,"node_id":"MDQ6VXNlcjU4NzAyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/587021?v=4","gravatar_id":"","url":"https://api.github.com/users/andrevmatos","html_url":"https://github.com/andrevmatos","followers_url":"https://api.github.com/users/andrevmatos/followers","following_url":"https://api.github.com/users/andrevmatos/following{/other_user}","gists_url":"https://api.github.com/users/andrevmatos/gists{/gist_id}","starred_url":"https://api.github.com/users/andrevmatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrevmatos/subscriptions","organizations_url":"https://api.github.com/users/andrevmatos/orgs","repos_url":"https://api.github.com/users/andrevmatos/repos","events_url":"https://api.github.com/users/andrevmatos/events{/privacy}","received_events_url":"https://api.github.com/users/andrevmatos/received_events","type":"User","site_admin":false},"body":"Agree, `App` could become a `Runnable` too, the problem is that there's too much things to organize here (in `cli.py`), startup and stop code should be moved to `app.py`, `check`s could go to its own module, or as functions [optionally] called from `App`, and `cli.py` should only be about `cli` and parameters. I gave up this refactoring, as the PR was already big enough, `cli.py`, `app.py`, `utils/cli.py` definitely need cleanup, we're running low on `*run*app` function/method names","created_at":"2018-08-31T13:40:35Z","updated_at":"2018-08-31T13:40:35Z","html_url":"https://github.com/raiden-network/raiden/pull/2208#discussion_r214356369","pull_request_url":"https://api.github.com/repos/raiden-network/raiden/pulls/2208","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/comments/214356369"},"html":{"href":"https://github.com/raiden-network/raiden/pull/2208#discussion_r214356369"},"pull_request":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/2208"}},"in_reply_to_id":214314831},"pull_request":{"url":"https://api.github.com/repos/raiden-network/raiden/pulls/2208","id":209098062,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MDk4MDYy","html_url":"https://github.com/raiden-network/raiden/pull/2208","diff_url":"https://github.com/raiden-network/raiden/pull/2208.diff","patch_url":"https://github.com/raiden-network/raiden/pull/2208.patch","issue_url":"https://api.github.com/repos/raiden-network/raiden/issues/2208","number":2208,"state":"open","locked":false,"title":"Exit longlived greenlets if any of them fails","user":{"login":"andrevmatos","id":587021,"node_id":"MDQ6VXNlcjU4NzAyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/587021?v=4","gravatar_id":"","url":"https://api.github.com/users/andrevmatos","html_url":"https://github.com/andrevmatos","followers_url":"https://api.github.com/users/andrevmatos/followers","following_url":"https://api.github.com/users/andrevmatos/following{/other_user}","gists_url":"https://api.github.com/users/andrevmatos/gists{/gist_id}","starred_url":"https://api.github.com/users/andrevmatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrevmatos/subscriptions","organizations_url":"https://api.github.com/users/andrevmatos/orgs","repos_url":"https://api.github.com/users/andrevmatos/repos","events_url":"https://api.github.com/users/andrevmatos/events{/privacy}","received_events_url":"https://api.github.com/users/andrevmatos/received_events","type":"User","site_admin":false},"body":"Implements 3rd point of #2201 ","created_at":"2018-08-17T09:48:53Z","updated_at":"2018-08-31T13:40:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f75e12b03faa5b14d1ab683210ecd8b59db61ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":456350195,"node_id":"MDU6TGFiZWw0NTYzNTAxOTU=","url":"https://api.github.com/repos/raiden-network/raiden/labels/dev:%20Please%20Review","name":"dev: Please Review","color":"006b75","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/raiden-network/raiden/pulls/2208/commits","review_comments_url":"https://api.github.com/repos/raiden-network/raiden/pulls/2208/comments","review_comment_url":"https://api.github.com/repos/raiden-network/raiden/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raiden-network/raiden/issues/2208/comments","statuses_url":"https://api.github.com/repos/raiden-network/raiden/statuses/b537e8432a021fe26de4d2c34f3522f43b7c8e77","head":{"label":"andrevmatos:exit_longlived_greenlets","ref":"exit_longlived_greenlets","sha":"b537e8432a021fe26de4d2c34f3522f43b7c8e77","user":{"login":"andrevmatos","id":587021,"node_id":"MDQ6VXNlcjU4NzAyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/587021?v=4","gravatar_id":"","url":"https://api.github.com/users/andrevmatos","html_url":"https://github.com/andrevmatos","followers_url":"https://api.github.com/users/andrevmatos/followers","following_url":"https://api.github.com/users/andrevmatos/following{/other_user}","gists_url":"https://api.github.com/users/andrevmatos/gists{/gist_id}","starred_url":"https://api.github.com/users/andrevmatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrevmatos/subscriptions","organizations_url":"https://api.github.com/users/andrevmatos/orgs","repos_url":"https://api.github.com/users/andrevmatos/repos","events_url":"https://api.github.com/users/andrevmatos/events{/privacy}","received_events_url":"https://api.github.com/users/andrevmatos/received_events","type":"User","site_admin":false},"repo":{"id":96226543,"node_id":"MDEwOlJlcG9zaXRvcnk5NjIyNjU0Mw==","name":"raiden","full_name":"andrevmatos/raiden","owner":{"login":"andrevmatos","id":587021,"node_id":"MDQ6VXNlcjU4NzAyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/587021?v=4","gravatar_id":"","url":"https://api.github.com/users/andrevmatos","html_url":"https://github.com/andrevmatos","followers_url":"https://api.github.com/users/andrevmatos/followers","following_url":"https://api.github.com/users/andrevmatos/following{/other_user}","gists_url":"https://api.github.com/users/andrevmatos/gists{/gist_id}","starred_url":"https://api.github.com/users/andrevmatos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrevmatos/subscriptions","organizations_url":"https://api.github.com/users/andrevmatos/orgs","repos_url":"https://api.github.com/users/andrevmatos/repos","events_url":"https://api.github.com/users/andrevmatos/events{/privacy}","received_events_url":"https://api.github.com/users/andrevmatos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrevmatos/raiden","description":"Raiden Network","fork":true,"url":"https://api.github.com/repos/andrevmatos/raiden","forks_url":"https://api.github.com/repos/andrevmatos/raiden/forks","keys_url":"https://api.github.com/repos/andrevmatos/raiden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrevmatos/raiden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrevmatos/raiden/teams","hooks_url":"https://api.github.com/repos/andrevmatos/raiden/hooks","issue_events_url":"https://api.github.com/repos/andrevmatos/raiden/issues/events{/number}","events_url":"https://api.github.com/repos/andrevmatos/raiden/events","assignees_url":"https://api.github.com/repos/andrevmatos/raiden/assignees{/user}","branches_url":"https://api.github.com/repos/andrevmatos/raiden/branches{/branch}","tags_url":"https://api.github.com/repos/andrevmatos/raiden/tags","blobs_url":"https://api.github.com/repos/andrevmatos/raiden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrevmatos/raiden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrevmatos/raiden/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrevmatos/raiden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrevmatos/raiden/statuses/{sha}","languages_url":"https://api.github.com/repos/andrevmatos/raiden/languages","stargazers_url":"https://api.github.com/repos/andrevmatos/raiden/stargazers","contributors_url":"https://api.github.com/repos/andrevmatos/raiden/contributors","subscribers_url":"https://api.github.com/repos/andrevmatos/raiden/subscribers","subscription_url":"https://api.github.com/repos/andrevmatos/raiden/subscription","commits_url":"https://api.github.com/repos/andrevmatos/raiden/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrevmatos/raiden/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrevmatos/raiden/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrevmatos/raiden/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrevmatos/raiden/contents/{+path}","compare_url":"https://api.github.com/repos/andrevmatos/raiden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrevmatos/raiden/merges","archive_url":"https://api.github.com/repos/andrevmatos/raiden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrevmatos/raiden/downloads","issues_url":"https://api.github.com/repos/andrevmatos/raiden/issues{/number}","pulls_url":"https://api.github.com/repos/andrevmatos/raiden/pulls{/number}","milestones_url":"https://api.github.com/repos/andrevmatos/raiden/milestones{/number}","notifications_url":"https://api.github.com/repos/andrevmatos/raiden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrevmatos/raiden/labels{/name}","releases_url":"https://api.github.com/repos/andrevmatos/raiden/releases{/id}","deployments_url":"https://api.github.com/repos/andrevmatos/raiden/deployments","created_at":"2017-07-04T14:28:56Z","updated_at":"2018-07-30T15:23:11Z","pushed_at":"2018-08-30T19:06:43Z","git_url":"git://github.com/andrevmatos/raiden.git","ssh_url":"git@github.com:andrevmatos/raiden.git","clone_url":"https://github.com/andrevmatos/raiden.git","svn_url":"https://github.com/andrevmatos/raiden","homepage":null,"size":9542,"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":"raiden-network:master","ref":"master","sha":"b0aac2c8c42a4713459119756752702ef6e0f7cb","user":{"login":"raiden-network","id":19666847,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjY2ODQ3","avatar_url":"https://avatars1.githubusercontent.com/u/19666847?v=4","gravatar_id":"","url":"https://api.github.com/users/raiden-network","html_url":"https://github.com/raiden-network","followers_url":"https://api.github.com/users/raiden-network/followers","following_url":"https://api.github.com/users/raiden-network/following{/other_user}","gists_url":"https://api.github.com/users/raiden-network/gists{/gist_id}","starred_url":"https://api.github.com/users/raiden-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiden-network/subscriptions","organizations_url":"https://api.github.com/users/raiden-network/orgs","repos_url":"https://api.github.com/users/raiden-network/repos","events_url":"https://api.github.com/users/raiden-network/events{/privacy}","received_events_url":"https://api.github.com/users/raiden-network/received_events","type":"Organization","site_admin":false},"repo":{"id":50646767,"node_id":"MDEwOlJlcG9zaXRvcnk1MDY0Njc2Nw==","name":"raiden","full_name":"raiden-network/raiden","owner":{"login":"raiden-network","id":19666847,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjY2ODQ3","avatar_url":"https://avatars1.githubusercontent.com/u/19666847?v=4","gravatar_id":"","url":"https://api.github.com/users/raiden-network","html_url":"https://github.com/raiden-network","followers_url":"https://api.github.com/users/raiden-network/followers","following_url":"https://api.github.com/users/raiden-network/following{/other_user}","gists_url":"https://api.github.com/users/raiden-network/gists{/gist_id}","starred_url":"https://api.github.com/users/raiden-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiden-network/subscriptions","organizations_url":"https://api.github.com/users/raiden-network/orgs","repos_url":"https://api.github.com/users/raiden-network/repos","events_url":"https://api.github.com/users/raiden-network/events{/privacy}","received_events_url":"https://api.github.com/users/raiden-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raiden-network/raiden","description":"Raiden Network","fork":false,"url":"https://api.github.com/repos/raiden-network/raiden","forks_url":"https://api.github.com/repos/raiden-network/raiden/forks","keys_url":"https://api.github.com/repos/raiden-network/raiden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raiden-network/raiden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raiden-network/raiden/teams","hooks_url":"https://api.github.com/repos/raiden-network/raiden/hooks","issue_events_url":"https://api.github.com/repos/raiden-network/raiden/issues/events{/number}","events_url":"https://api.github.com/repos/raiden-network/raiden/events","assignees_url":"https://api.github.com/repos/raiden-network/raiden/assignees{/user}","branches_url":"https://api.github.com/repos/raiden-network/raiden/branches{/branch}","tags_url":"https://api.github.com/repos/raiden-network/raiden/tags","blobs_url":"https://api.github.com/repos/raiden-network/raiden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raiden-network/raiden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raiden-network/raiden/git/refs{/sha}","trees_url":"https://api.github.com/repos/raiden-network/raiden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raiden-network/raiden/statuses/{sha}","languages_url":"https://api.github.com/repos/raiden-network/raiden/languages","stargazers_url":"https://api.github.com/repos/raiden-network/raiden/stargazers","contributors_url":"https://api.github.com/repos/raiden-network/raiden/contributors","subscribers_url":"https://api.github.com/repos/raiden-network/raiden/subscribers","subscription_url":"https://api.github.com/repos/raiden-network/raiden/subscription","commits_url":"https://api.github.com/repos/raiden-network/raiden/commits{/sha}","git_commits_url":"https://api.github.com/repos/raiden-network/raiden/git/commits{/sha}","comments_url":"https://api.github.com/repos/raiden-network/raiden/comments{/number}","issue_comment_url":"https://api.github.com/repos/raiden-network/raiden/issues/comments{/number}","contents_url":"https://api.github.com/repos/raiden-network/raiden/contents/{+path}","compare_url":"https://api.github.com/repos/raiden-network/raiden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raiden-network/raiden/merges","archive_url":"https://api.github.com/repos/raiden-network/raiden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raiden-network/raiden/downloads","issues_url":"https://api.github.com/repos/raiden-network/raiden/issues{/number}","pulls_url":"https://api.github.com/repos/raiden-network/raiden/pulls{/number}","milestones_url":"https://api.github.com/repos/raiden-network/raiden/milestones{/number}","notifications_url":"https://api.github.com/repos/raiden-network/raiden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raiden-network/raiden/labels{/name}","releases_url":"https://api.github.com/repos/raiden-network/raiden/releases{/id}","deployments_url":"https://api.github.com/repos/raiden-network/raiden/deployments","created_at":"2016-01-29T07:40:47Z","updated_at":"2018-08-31T13:09:40Z","pushed_at":"2018-08-31T13:32:16Z","git_url":"git://github.com/raiden-network/raiden.git","ssh_url":"git@github.com:raiden-network/raiden.git","clone_url":"https://github.com/raiden-network/raiden.git","svn_url":"https://github.com/raiden-network/raiden","homepage":null,"size":9563,"stargazers_count":1520,"watchers_count":1520,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":179,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":310,"open_issues":179,"watchers":1520,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/2208"},"html":{"href":"https://github.com/raiden-network/raiden/pull/2208"},"issue":{"href":"https://api.github.com/repos/raiden-network/raiden/issues/2208"},"comments":{"href":"https://api.github.com/repos/raiden-network/raiden/issues/2208/comments"},"review_comments":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/2208/comments"},"review_comment":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/2208/commits"},"statuses":{"href":"https://api.github.com/repos/raiden-network/raiden/statuses/b537e8432a021fe26de4d2c34f3522f43b7c8e77"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"andrevmatos"}}