{"action":"created","comment":{"url":"https://api.github.com/repos/eggjs/egg/pulls/comments/99274722","pull_request_review_id":19946653,"id":99274722,"diff_hunk":"@@ -50,8 +51,13 @@ class EggApplication extends EggCore {\n     this._unhandledRejectionHandler = this._unhandledRejectionHandler.bind(this);\n     process.on('unhandledRejection', this._unhandledRejectionHandler);\n \n+    this[CLUSTER_CLIENTS] = [];\n+\n     // register close function\n     this.beforeClose(() => {\n+      console.log('before close', this[CLUSTER_CLIENTS].length);\n+      this[CLUSTER_CLIENTS].forEach(client => client.close());","path":"lib/egg.js","position":17,"original_position":17,"commit_id":"fc4dfc623c13f39c6aea3c0c4429374065fe19aa","original_commit_id":"fc4dfc623c13f39c6aea3c0c4429374065fe19aa","user":{"login":"popomore","id":360661,"avatar_url":"https://avatars.githubusercontent.com/u/360661?v=3","gravatar_id":"","url":"https://api.github.com/users/popomore","html_url":"https://github.com/popomore","followers_url":"https://api.github.com/users/popomore/followers","following_url":"https://api.github.com/users/popomore/following{/other_user}","gists_url":"https://api.github.com/users/popomore/gists{/gist_id}","starred_url":"https://api.github.com/users/popomore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popomore/subscriptions","organizations_url":"https://api.github.com/users/popomore/orgs","repos_url":"https://api.github.com/users/popomore/repos","events_url":"https://api.github.com/users/popomore/events{/privacy}","received_events_url":"https://api.github.com/users/popomore/received_events","type":"User","site_admin":false},"body":"这个加到 app.cluster 里？","created_at":"2017-02-03T04:22:28Z","updated_at":"2017-02-03T04:23:46Z","html_url":"https://github.com/eggjs/egg/pull/310#discussion_r99274722","pull_request_url":"https://api.github.com/repos/eggjs/egg/pulls/310","_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg/pulls/comments/99274722"},"html":{"href":"https://github.com/eggjs/egg/pull/310#discussion_r99274722"},"pull_request":{"href":"https://api.github.com/repos/eggjs/egg/pulls/310"}}},"pull_request":{"url":"https://api.github.com/repos/eggjs/egg/pulls/310","id":104470912,"html_url":"https://github.com/eggjs/egg/pull/310","diff_url":"https://github.com/eggjs/egg/pull/310.diff","patch_url":"https://github.com/eggjs/egg/pull/310.patch","issue_url":"https://api.github.com/repos/eggjs/egg/issues/310","number":310,"state":"open","locked":false,"title":"[WIP] feat: close clust clients before close","user":{"login":"shaoshuai0102","id":456108,"avatar_url":"https://avatars.githubusercontent.com/u/456108?v=3","gravatar_id":"","url":"https://api.github.com/users/shaoshuai0102","html_url":"https://github.com/shaoshuai0102","followers_url":"https://api.github.com/users/shaoshuai0102/followers","following_url":"https://api.github.com/users/shaoshuai0102/following{/other_user}","gists_url":"https://api.github.com/users/shaoshuai0102/gists{/gist_id}","starred_url":"https://api.github.com/users/shaoshuai0102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaoshuai0102/subscriptions","organizations_url":"https://api.github.com/users/shaoshuai0102/orgs","repos_url":"https://api.github.com/users/shaoshuai0102/repos","events_url":"https://api.github.com/users/shaoshuai0102/events{/privacy}","received_events_url":"https://api.github.com/users/shaoshuai0102/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for your pull request. Please review below requirements.\r\nBug fixes and new features should include tests and possibly benchmarks.\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n\r\n感谢您贡献代码。请确认下列 checklist 的完成情况。\r\nBug 修复和新功能必须包含测试，必要时请附上性能测试。\r\nContributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [ ] `npm test` passes\r\n- [ ] tests and/or benchmarks are included\r\n- [ ] documentation is changed or added\r\n- [ ] commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s). -->\r\n\r\n\r\n##### Description of change\r\n<!-- Provide a description of the change below this comment. -->\r\n","created_at":"2017-02-03T03:43:24Z","updated_at":"2017-02-03T04:23:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"abe69635cf7f2d2564328d0d7d47e10f84f2081a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/eggjs/egg/pulls/310/commits","review_comments_url":"https://api.github.com/repos/eggjs/egg/pulls/310/comments","review_comment_url":"https://api.github.com/repos/eggjs/egg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eggjs/egg/issues/310/comments","statuses_url":"https://api.github.com/repos/eggjs/egg/statuses/fc4dfc623c13f39c6aea3c0c4429374065fe19aa","head":{"label":"eggjs:feat-close-cluster-clients-before-close","ref":"feat-close-cluster-clients-before-close","sha":"fc4dfc623c13f39c6aea3c0c4429374065fe19aa","user":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421257,"name":"egg","full_name":"eggjs/egg","owner":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg","description":"Born to build better enterprise frameworks and apps","fork":false,"url":"https://api.github.com/repos/eggjs/egg","forks_url":"https://api.github.com/repos/eggjs/egg/forks","keys_url":"https://api.github.com/repos/eggjs/egg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg/teams","hooks_url":"https://api.github.com/repos/eggjs/egg/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg/events","assignees_url":"https://api.github.com/repos/eggjs/egg/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg/tags","blobs_url":"https://api.github.com/repos/eggjs/egg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg/subscription","commits_url":"https://api.github.com/repos/eggjs/egg/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg/merges","archive_url":"https://api.github.com/repos/eggjs/egg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg/downloads","issues_url":"https://api.github.com/repos/eggjs/egg/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg/deployments","created_at":"2016-06-18T06:53:23Z","updated_at":"2017-02-03T02:19:35Z","pushed_at":"2017-02-03T03:43:25Z","git_url":"git://github.com/eggjs/egg.git","ssh_url":"git@github.com:eggjs/egg.git","clone_url":"https://github.com/eggjs/egg.git","svn_url":"https://github.com/eggjs/egg","homepage":"https://eggjs.org","size":1914,"stargazers_count":665,"watchers_count":665,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":45,"forks":54,"open_issues":45,"watchers":665,"default_branch":"master"}},"base":{"label":"eggjs:master","ref":"master","sha":"8d98e4ff033a4fd4a0c10895c8bb90c724a9cfd2","user":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"repo":{"id":61421257,"name":"egg","full_name":"eggjs/egg","owner":{"login":"eggjs","id":15833670,"avatar_url":"https://avatars.githubusercontent.com/u/15833670?v=3","gravatar_id":"","url":"https://api.github.com/users/eggjs","html_url":"https://github.com/eggjs","followers_url":"https://api.github.com/users/eggjs/followers","following_url":"https://api.github.com/users/eggjs/following{/other_user}","gists_url":"https://api.github.com/users/eggjs/gists{/gist_id}","starred_url":"https://api.github.com/users/eggjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eggjs/subscriptions","organizations_url":"https://api.github.com/users/eggjs/orgs","repos_url":"https://api.github.com/users/eggjs/repos","events_url":"https://api.github.com/users/eggjs/events{/privacy}","received_events_url":"https://api.github.com/users/eggjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eggjs/egg","description":"Born to build better enterprise frameworks and apps","fork":false,"url":"https://api.github.com/repos/eggjs/egg","forks_url":"https://api.github.com/repos/eggjs/egg/forks","keys_url":"https://api.github.com/repos/eggjs/egg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eggjs/egg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eggjs/egg/teams","hooks_url":"https://api.github.com/repos/eggjs/egg/hooks","issue_events_url":"https://api.github.com/repos/eggjs/egg/issues/events{/number}","events_url":"https://api.github.com/repos/eggjs/egg/events","assignees_url":"https://api.github.com/repos/eggjs/egg/assignees{/user}","branches_url":"https://api.github.com/repos/eggjs/egg/branches{/branch}","tags_url":"https://api.github.com/repos/eggjs/egg/tags","blobs_url":"https://api.github.com/repos/eggjs/egg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eggjs/egg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eggjs/egg/git/refs{/sha}","trees_url":"https://api.github.com/repos/eggjs/egg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eggjs/egg/statuses/{sha}","languages_url":"https://api.github.com/repos/eggjs/egg/languages","stargazers_url":"https://api.github.com/repos/eggjs/egg/stargazers","contributors_url":"https://api.github.com/repos/eggjs/egg/contributors","subscribers_url":"https://api.github.com/repos/eggjs/egg/subscribers","subscription_url":"https://api.github.com/repos/eggjs/egg/subscription","commits_url":"https://api.github.com/repos/eggjs/egg/commits{/sha}","git_commits_url":"https://api.github.com/repos/eggjs/egg/git/commits{/sha}","comments_url":"https://api.github.com/repos/eggjs/egg/comments{/number}","issue_comment_url":"https://api.github.com/repos/eggjs/egg/issues/comments{/number}","contents_url":"https://api.github.com/repos/eggjs/egg/contents/{+path}","compare_url":"https://api.github.com/repos/eggjs/egg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eggjs/egg/merges","archive_url":"https://api.github.com/repos/eggjs/egg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eggjs/egg/downloads","issues_url":"https://api.github.com/repos/eggjs/egg/issues{/number}","pulls_url":"https://api.github.com/repos/eggjs/egg/pulls{/number}","milestones_url":"https://api.github.com/repos/eggjs/egg/milestones{/number}","notifications_url":"https://api.github.com/repos/eggjs/egg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eggjs/egg/labels{/name}","releases_url":"https://api.github.com/repos/eggjs/egg/releases{/id}","deployments_url":"https://api.github.com/repos/eggjs/egg/deployments","created_at":"2016-06-18T06:53:23Z","updated_at":"2017-02-03T02:19:35Z","pushed_at":"2017-02-03T03:43:25Z","git_url":"git://github.com/eggjs/egg.git","ssh_url":"git@github.com:eggjs/egg.git","clone_url":"https://github.com/eggjs/egg.git","svn_url":"https://github.com/eggjs/egg","homepage":"https://eggjs.org","size":1914,"stargazers_count":665,"watchers_count":665,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":45,"forks":54,"open_issues":45,"watchers":665,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eggjs/egg/pulls/310"},"html":{"href":"https://github.com/eggjs/egg/pull/310"},"issue":{"href":"https://api.github.com/repos/eggjs/egg/issues/310"},"comments":{"href":"https://api.github.com/repos/eggjs/egg/issues/310/comments"},"review_comments":{"href":"https://api.github.com/repos/eggjs/egg/pulls/310/comments"},"review_comment":{"href":"https://api.github.com/repos/eggjs/egg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eggjs/egg/pulls/310/commits"},"statuses":{"href":"https://api.github.com/repos/eggjs/egg/statuses/fc4dfc623c13f39c6aea3c0c4429374065fe19aa"}}}}
{"actor":{"display_login":"popomore"}}