{"action":"created","comment":{"url":"https://api.github.com/repos/php-pm/php-pm/pulls/comments/195944772","pull_request_review_id":129404450,"id":195944772,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTk0NDc3Mg==","diff_hunk":"@@ -137,6 +137,13 @@ public function getNextSlave()\n      */\n     public function slaveAvailable(Slave $slave)\n     {\n+        if ($slave->isExpired()) {\n+            $slave->close();\n+            $this->output->writeln(sprintf('Restart worker #%d because it reached its TTL', $slave->getPort()));","path":"src/RequestHandler.php","position":6,"original_position":6,"commit_id":"513b845f9190cf70f97465da12b9fb7e7a01b970","original_commit_id":"513b845f9190cf70f97465da12b9fb7e7a01b970","user":{"login":"marcj","id":450980,"node_id":"MDQ6VXNlcjQ1MDk4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/450980?v=4","gravatar_id":"","url":"https://api.github.com/users/marcj","html_url":"https://github.com/marcj","followers_url":"https://api.github.com/users/marcj/followers","following_url":"https://api.github.com/users/marcj/following{/other_user}","gists_url":"https://api.github.com/users/marcj/gists{/gist_id}","starred_url":"https://api.github.com/users/marcj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcj/subscriptions","organizations_url":"https://api.github.com/users/marcj/orgs","repos_url":"https://api.github.com/users/marcj/repos","events_url":"https://api.github.com/users/marcj/events{/privacy}","received_events_url":"https://api.github.com/users/marcj/received_events","type":"User","site_admin":false},"body":"We should print that only in verbose mode, shouldn't we?","created_at":"2018-06-17T23:18:51Z","updated_at":"2018-06-17T23:18:51Z","html_url":"https://github.com/php-pm/php-pm/pull/392#discussion_r195944772","pull_request_url":"https://api.github.com/repos/php-pm/php-pm/pulls/392","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/comments/195944772"},"html":{"href":"https://github.com/php-pm/php-pm/pull/392#discussion_r195944772"},"pull_request":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/392"}}},"pull_request":{"url":"https://api.github.com/repos/php-pm/php-pm/pulls/392","id":195370325,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1MzcwMzI1","html_url":"https://github.com/php-pm/php-pm/pull/392","diff_url":"https://github.com/php-pm/php-pm/pull/392.diff","patch_url":"https://github.com/php-pm/php-pm/pull/392.patch","issue_url":"https://api.github.com/repos/php-pm/php-pm/issues/392","number":392,"state":"open","locked":false,"title":"Worker TTL","user":{"login":"bpolaszek","id":5569077,"node_id":"MDQ6VXNlcjU1NjkwNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/5569077?v=4","gravatar_id":"","url":"https://api.github.com/users/bpolaszek","html_url":"https://github.com/bpolaszek","followers_url":"https://api.github.com/users/bpolaszek/followers","following_url":"https://api.github.com/users/bpolaszek/following{/other_user}","gists_url":"https://api.github.com/users/bpolaszek/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolaszek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolaszek/subscriptions","organizations_url":"https://api.github.com/users/bpolaszek/orgs","repos_url":"https://api.github.com/users/bpolaszek/repos","events_url":"https://api.github.com/users/bpolaszek/events{/privacy}","received_events_url":"https://api.github.com/users/bpolaszek/received_events","type":"User","site_admin":false},"body":"Following #391 \r\n\r\nThis PR is a proof of concept which adds a `ttl` option that may, or may not, be used in `ppm.json`. \r\nWhen a request comes in, the worker must not have outrun its time to live, or it will be reloaded.\r\n\r\nThis is the first time I dive into the PPM code, please review & test this before merging.\r\n\r\nThank you,\r\nBen","created_at":"2018-06-17T09:57:37Z","updated_at":"2018-06-17T23:18:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc5b90f0abe53a2442e507a30d903a2602a45971","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/php-pm/php-pm/pulls/392/commits","review_comments_url":"https://api.github.com/repos/php-pm/php-pm/pulls/392/comments","review_comment_url":"https://api.github.com/repos/php-pm/php-pm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php-pm/php-pm/issues/392/comments","statuses_url":"https://api.github.com/repos/php-pm/php-pm/statuses/513b845f9190cf70f97465da12b9fb7e7a01b970","head":{"label":"bpolaszek:worker-ttl","ref":"worker-ttl","sha":"513b845f9190cf70f97465da12b9fb7e7a01b970","user":{"login":"bpolaszek","id":5569077,"node_id":"MDQ6VXNlcjU1NjkwNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/5569077?v=4","gravatar_id":"","url":"https://api.github.com/users/bpolaszek","html_url":"https://github.com/bpolaszek","followers_url":"https://api.github.com/users/bpolaszek/followers","following_url":"https://api.github.com/users/bpolaszek/following{/other_user}","gists_url":"https://api.github.com/users/bpolaszek/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolaszek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolaszek/subscriptions","organizations_url":"https://api.github.com/users/bpolaszek/orgs","repos_url":"https://api.github.com/users/bpolaszek/repos","events_url":"https://api.github.com/users/bpolaszek/events{/privacy}","received_events_url":"https://api.github.com/users/bpolaszek/received_events","type":"User","site_admin":false},"repo":{"id":107696139,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc2OTYxMzk=","name":"php-pm","full_name":"bpolaszek/php-pm","owner":{"login":"bpolaszek","id":5569077,"node_id":"MDQ6VXNlcjU1NjkwNzc=","avatar_url":"https://avatars0.githubusercontent.com/u/5569077?v=4","gravatar_id":"","url":"https://api.github.com/users/bpolaszek","html_url":"https://github.com/bpolaszek","followers_url":"https://api.github.com/users/bpolaszek/followers","following_url":"https://api.github.com/users/bpolaszek/following{/other_user}","gists_url":"https://api.github.com/users/bpolaszek/gists{/gist_id}","starred_url":"https://api.github.com/users/bpolaszek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpolaszek/subscriptions","organizations_url":"https://api.github.com/users/bpolaszek/orgs","repos_url":"https://api.github.com/users/bpolaszek/repos","events_url":"https://api.github.com/users/bpolaszek/events{/privacy}","received_events_url":"https://api.github.com/users/bpolaszek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bpolaszek/php-pm","description":"PPM is a process manager, supercharger and load balancer for modern PHP applications.","fork":true,"url":"https://api.github.com/repos/bpolaszek/php-pm","forks_url":"https://api.github.com/repos/bpolaszek/php-pm/forks","keys_url":"https://api.github.com/repos/bpolaszek/php-pm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bpolaszek/php-pm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bpolaszek/php-pm/teams","hooks_url":"https://api.github.com/repos/bpolaszek/php-pm/hooks","issue_events_url":"https://api.github.com/repos/bpolaszek/php-pm/issues/events{/number}","events_url":"https://api.github.com/repos/bpolaszek/php-pm/events","assignees_url":"https://api.github.com/repos/bpolaszek/php-pm/assignees{/user}","branches_url":"https://api.github.com/repos/bpolaszek/php-pm/branches{/branch}","tags_url":"https://api.github.com/repos/bpolaszek/php-pm/tags","blobs_url":"https://api.github.com/repos/bpolaszek/php-pm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bpolaszek/php-pm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bpolaszek/php-pm/git/refs{/sha}","trees_url":"https://api.github.com/repos/bpolaszek/php-pm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bpolaszek/php-pm/statuses/{sha}","languages_url":"https://api.github.com/repos/bpolaszek/php-pm/languages","stargazers_url":"https://api.github.com/repos/bpolaszek/php-pm/stargazers","contributors_url":"https://api.github.com/repos/bpolaszek/php-pm/contributors","subscribers_url":"https://api.github.com/repos/bpolaszek/php-pm/subscribers","subscription_url":"https://api.github.com/repos/bpolaszek/php-pm/subscription","commits_url":"https://api.github.com/repos/bpolaszek/php-pm/commits{/sha}","git_commits_url":"https://api.github.com/repos/bpolaszek/php-pm/git/commits{/sha}","comments_url":"https://api.github.com/repos/bpolaszek/php-pm/comments{/number}","issue_comment_url":"https://api.github.com/repos/bpolaszek/php-pm/issues/comments{/number}","contents_url":"https://api.github.com/repos/bpolaszek/php-pm/contents/{+path}","compare_url":"https://api.github.com/repos/bpolaszek/php-pm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bpolaszek/php-pm/merges","archive_url":"https://api.github.com/repos/bpolaszek/php-pm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bpolaszek/php-pm/downloads","issues_url":"https://api.github.com/repos/bpolaszek/php-pm/issues{/number}","pulls_url":"https://api.github.com/repos/bpolaszek/php-pm/pulls{/number}","milestones_url":"https://api.github.com/repos/bpolaszek/php-pm/milestones{/number}","notifications_url":"https://api.github.com/repos/bpolaszek/php-pm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bpolaszek/php-pm/labels{/name}","releases_url":"https://api.github.com/repos/bpolaszek/php-pm/releases{/id}","deployments_url":"https://api.github.com/repos/bpolaszek/php-pm/deployments","created_at":"2017-10-20T15:41:27Z","updated_at":"2017-10-20T15:41:29Z","pushed_at":"2018-06-17T09:53:55Z","git_url":"git://github.com/bpolaszek/php-pm.git","ssh_url":"git@github.com:bpolaszek/php-pm.git","clone_url":"https://github.com/bpolaszek/php-pm.git","svn_url":"https://github.com/bpolaszek/php-pm","homepage":"","size":630,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"php-pm:master","ref":"master","sha":"d1dd43f4c89e0b8d6dbe4fa2a258546637a7c170","user":{"login":"php-pm","id":11821812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODIxODEy","avatar_url":"https://avatars1.githubusercontent.com/u/11821812?v=4","gravatar_id":"","url":"https://api.github.com/users/php-pm","html_url":"https://github.com/php-pm","followers_url":"https://api.github.com/users/php-pm/followers","following_url":"https://api.github.com/users/php-pm/following{/other_user}","gists_url":"https://api.github.com/users/php-pm/gists{/gist_id}","starred_url":"https://api.github.com/users/php-pm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-pm/subscriptions","organizations_url":"https://api.github.com/users/php-pm/orgs","repos_url":"https://api.github.com/users/php-pm/repos","events_url":"https://api.github.com/users/php-pm/events{/privacy}","received_events_url":"https://api.github.com/users/php-pm/received_events","type":"Organization","site_admin":false},"repo":{"id":17154573,"node_id":"MDEwOlJlcG9zaXRvcnkxNzE1NDU3Mw==","name":"php-pm","full_name":"php-pm/php-pm","owner":{"login":"php-pm","id":11821812,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODIxODEy","avatar_url":"https://avatars1.githubusercontent.com/u/11821812?v=4","gravatar_id":"","url":"https://api.github.com/users/php-pm","html_url":"https://github.com/php-pm","followers_url":"https://api.github.com/users/php-pm/followers","following_url":"https://api.github.com/users/php-pm/following{/other_user}","gists_url":"https://api.github.com/users/php-pm/gists{/gist_id}","starred_url":"https://api.github.com/users/php-pm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php-pm/subscriptions","organizations_url":"https://api.github.com/users/php-pm/orgs","repos_url":"https://api.github.com/users/php-pm/repos","events_url":"https://api.github.com/users/php-pm/events{/privacy}","received_events_url":"https://api.github.com/users/php-pm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php-pm/php-pm","description":"PPM is a process manager, supercharger and load balancer for modern PHP applications.","fork":false,"url":"https://api.github.com/repos/php-pm/php-pm","forks_url":"https://api.github.com/repos/php-pm/php-pm/forks","keys_url":"https://api.github.com/repos/php-pm/php-pm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php-pm/php-pm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php-pm/php-pm/teams","hooks_url":"https://api.github.com/repos/php-pm/php-pm/hooks","issue_events_url":"https://api.github.com/repos/php-pm/php-pm/issues/events{/number}","events_url":"https://api.github.com/repos/php-pm/php-pm/events","assignees_url":"https://api.github.com/repos/php-pm/php-pm/assignees{/user}","branches_url":"https://api.github.com/repos/php-pm/php-pm/branches{/branch}","tags_url":"https://api.github.com/repos/php-pm/php-pm/tags","blobs_url":"https://api.github.com/repos/php-pm/php-pm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php-pm/php-pm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php-pm/php-pm/git/refs{/sha}","trees_url":"https://api.github.com/repos/php-pm/php-pm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php-pm/php-pm/statuses/{sha}","languages_url":"https://api.github.com/repos/php-pm/php-pm/languages","stargazers_url":"https://api.github.com/repos/php-pm/php-pm/stargazers","contributors_url":"https://api.github.com/repos/php-pm/php-pm/contributors","subscribers_url":"https://api.github.com/repos/php-pm/php-pm/subscribers","subscription_url":"https://api.github.com/repos/php-pm/php-pm/subscription","commits_url":"https://api.github.com/repos/php-pm/php-pm/commits{/sha}","git_commits_url":"https://api.github.com/repos/php-pm/php-pm/git/commits{/sha}","comments_url":"https://api.github.com/repos/php-pm/php-pm/comments{/number}","issue_comment_url":"https://api.github.com/repos/php-pm/php-pm/issues/comments{/number}","contents_url":"https://api.github.com/repos/php-pm/php-pm/contents/{+path}","compare_url":"https://api.github.com/repos/php-pm/php-pm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php-pm/php-pm/merges","archive_url":"https://api.github.com/repos/php-pm/php-pm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php-pm/php-pm/downloads","issues_url":"https://api.github.com/repos/php-pm/php-pm/issues{/number}","pulls_url":"https://api.github.com/repos/php-pm/php-pm/pulls{/number}","milestones_url":"https://api.github.com/repos/php-pm/php-pm/milestones{/number}","notifications_url":"https://api.github.com/repos/php-pm/php-pm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php-pm/php-pm/labels{/name}","releases_url":"https://api.github.com/repos/php-pm/php-pm/releases{/id}","deployments_url":"https://api.github.com/repos/php-pm/php-pm/deployments","created_at":"2014-02-24T23:25:40Z","updated_at":"2018-06-17T21:34:16Z","pushed_at":"2018-06-17T09:57:37Z","git_url":"git://github.com/php-pm/php-pm.git","ssh_url":"git@github.com:php-pm/php-pm.git","clone_url":"https://github.com/php-pm/php-pm.git","svn_url":"https://github.com/php-pm/php-pm","homepage":"","size":634,"stargazers_count":5045,"watchers_count":5045,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":278,"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":278,"open_issues":33,"watchers":5045,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/392"},"html":{"href":"https://github.com/php-pm/php-pm/pull/392"},"issue":{"href":"https://api.github.com/repos/php-pm/php-pm/issues/392"},"comments":{"href":"https://api.github.com/repos/php-pm/php-pm/issues/392/comments"},"review_comments":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/392/comments"},"review_comment":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php-pm/php-pm/pulls/392/commits"},"statuses":{"href":"https://api.github.com/repos/php-pm/php-pm/statuses/513b845f9190cf70f97465da12b9fb7e7a01b970"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcj"}}