{"action":"created","comment":{"url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/comments/188506093","pull_request_review_id":120496529,"id":188506093,"diff_hunk":"@@ -11,6 +11,11 @@ public function __construct();\n      */\n     public function interval();\n \n+    /**\n+     * @return bool $isImmediate\n+     */\n+    public function isImmediate();","path":"src/Swoole/Timer/CronJobInterface.php","position":7,"original_position":7,"commit_id":"f6df3a859639b79d4523e3a84b851fd38cba4662","original_commit_id":"f6df3a859639b79d4523e3a84b851fd38cba4662","user":{"login":"hhxsv5","id":7278743,"avatar_url":"https://avatars1.githubusercontent.com/u/7278743?v=4","gravatar_id":"","url":"https://api.github.com/users/hhxsv5","html_url":"https://github.com/hhxsv5","followers_url":"https://api.github.com/users/hhxsv5/followers","following_url":"https://api.github.com/users/hhxsv5/following{/other_user}","gists_url":"https://api.github.com/users/hhxsv5/gists{/gist_id}","starred_url":"https://api.github.com/users/hhxsv5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhxsv5/subscriptions","organizations_url":"https://api.github.com/users/hhxsv5/orgs","repos_url":"https://api.github.com/users/hhxsv5/repos","events_url":"https://api.github.com/users/hhxsv5/events{/privacy}","received_events_url":"https://api.github.com/users/hhxsv5/received_events","type":"User","site_admin":false},"body":"abstract class CronJob中缺少默认实现，默认为false","created_at":"2018-05-16T05:25:45Z","updated_at":"2018-05-16T05:26:49Z","html_url":"https://github.com/hhxsv5/laravel-s/pull/38#discussion_r188506093","pull_request_url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/comments/188506093"},"html":{"href":"https://github.com/hhxsv5/laravel-s/pull/38#discussion_r188506093"},"pull_request":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38","id":188152393,"html_url":"https://github.com/hhxsv5/laravel-s/pull/38","diff_url":"https://github.com/hhxsv5/laravel-s/pull/38.diff","patch_url":"https://github.com/hhxsv5/laravel-s/pull/38.patch","issue_url":"https://api.github.com/repos/hhxsv5/laravel-s/issues/38","number":38,"state":"open","locked":false,"title":"Enable timers to run immediately after setting up.","user":{"login":"heikezy","id":23469706,"avatar_url":"https://avatars3.githubusercontent.com/u/23469706?v=4","gravatar_id":"","url":"https://api.github.com/users/heikezy","html_url":"https://github.com/heikezy","followers_url":"https://api.github.com/users/heikezy/followers","following_url":"https://api.github.com/users/heikezy/following{/other_user}","gists_url":"https://api.github.com/users/heikezy/gists{/gist_id}","starred_url":"https://api.github.com/users/heikezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heikezy/subscriptions","organizations_url":"https://api.github.com/users/heikezy/orgs","repos_url":"https://api.github.com/users/heikezy/repos","events_url":"https://api.github.com/users/heikezy/events{/privacy}","received_events_url":"https://api.github.com/users/heikezy/received_events","type":"User","site_admin":false},"body":"I noticed that once the CrobJob has been set up, then it's gonna take a whole interval time for the timer to tick for the first time.  In some occasions, an immediate tick is neccesary. I managed to achieve this by adding property getter `isImmediate` and a few lines using `swoole_timer_after`.\r\n\r\nNote: This change is not compatible with the previous CronJobs. `isImmediate` need to be added to the previous CronJob implementation to run properly.\r\n\r\n注意到定时任务 CrobJob 在设定好后并不会马上执行第一次，而会等待第一个时间间隔后执行第一次。而在某些情况下，特别是对于时间间隔很长的任务，设定 CrobJob 后立即执行第一次是很必要的。通过添加属性 getter `isImmediate` 并调用 `swoole_timer_after`，这个需求已经被实现。\r\n\r\n注意：该改动并不兼容之前的CronJob。需要为之前实现的CronJob添加isImmediate方法后才能正常运行。","created_at":"2018-05-15T14:42:38Z","updated_at":"2018-05-16T05:26:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b839709950753abf2f87315c5f447327bb477af","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38/commits","review_comments_url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38/comments","review_comment_url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hhxsv5/laravel-s/issues/38/comments","statuses_url":"https://api.github.com/repos/hhxsv5/laravel-s/statuses/f6df3a859639b79d4523e3a84b851fd38cba4662","head":{"label":"heikezy:master","ref":"master","sha":"f6df3a859639b79d4523e3a84b851fd38cba4662","user":{"login":"heikezy","id":23469706,"avatar_url":"https://avatars3.githubusercontent.com/u/23469706?v=4","gravatar_id":"","url":"https://api.github.com/users/heikezy","html_url":"https://github.com/heikezy","followers_url":"https://api.github.com/users/heikezy/followers","following_url":"https://api.github.com/users/heikezy/following{/other_user}","gists_url":"https://api.github.com/users/heikezy/gists{/gist_id}","starred_url":"https://api.github.com/users/heikezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heikezy/subscriptions","organizations_url":"https://api.github.com/users/heikezy/orgs","repos_url":"https://api.github.com/users/heikezy/repos","events_url":"https://api.github.com/users/heikezy/events{/privacy}","received_events_url":"https://api.github.com/users/heikezy/received_events","type":"User","site_admin":false},"repo":{"id":133521757,"name":"laravel-s","full_name":"heikezy/laravel-s","owner":{"login":"heikezy","id":23469706,"avatar_url":"https://avatars3.githubusercontent.com/u/23469706?v=4","gravatar_id":"","url":"https://api.github.com/users/heikezy","html_url":"https://github.com/heikezy","followers_url":"https://api.github.com/users/heikezy/followers","following_url":"https://api.github.com/users/heikezy/following{/other_user}","gists_url":"https://api.github.com/users/heikezy/gists{/gist_id}","starred_url":"https://api.github.com/users/heikezy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heikezy/subscriptions","organizations_url":"https://api.github.com/users/heikezy/orgs","repos_url":"https://api.github.com/users/heikezy/repos","events_url":"https://api.github.com/users/heikezy/events{/privacy}","received_events_url":"https://api.github.com/users/heikezy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/heikezy/laravel-s","description":"🚀 LaravelS: speed up Laravel/Lumen by Swoole, let's fly.","fork":true,"url":"https://api.github.com/repos/heikezy/laravel-s","forks_url":"https://api.github.com/repos/heikezy/laravel-s/forks","keys_url":"https://api.github.com/repos/heikezy/laravel-s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heikezy/laravel-s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heikezy/laravel-s/teams","hooks_url":"https://api.github.com/repos/heikezy/laravel-s/hooks","issue_events_url":"https://api.github.com/repos/heikezy/laravel-s/issues/events{/number}","events_url":"https://api.github.com/repos/heikezy/laravel-s/events","assignees_url":"https://api.github.com/repos/heikezy/laravel-s/assignees{/user}","branches_url":"https://api.github.com/repos/heikezy/laravel-s/branches{/branch}","tags_url":"https://api.github.com/repos/heikezy/laravel-s/tags","blobs_url":"https://api.github.com/repos/heikezy/laravel-s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heikezy/laravel-s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heikezy/laravel-s/git/refs{/sha}","trees_url":"https://api.github.com/repos/heikezy/laravel-s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heikezy/laravel-s/statuses/{sha}","languages_url":"https://api.github.com/repos/heikezy/laravel-s/languages","stargazers_url":"https://api.github.com/repos/heikezy/laravel-s/stargazers","contributors_url":"https://api.github.com/repos/heikezy/laravel-s/contributors","subscribers_url":"https://api.github.com/repos/heikezy/laravel-s/subscribers","subscription_url":"https://api.github.com/repos/heikezy/laravel-s/subscription","commits_url":"https://api.github.com/repos/heikezy/laravel-s/commits{/sha}","git_commits_url":"https://api.github.com/repos/heikezy/laravel-s/git/commits{/sha}","comments_url":"https://api.github.com/repos/heikezy/laravel-s/comments{/number}","issue_comment_url":"https://api.github.com/repos/heikezy/laravel-s/issues/comments{/number}","contents_url":"https://api.github.com/repos/heikezy/laravel-s/contents/{+path}","compare_url":"https://api.github.com/repos/heikezy/laravel-s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heikezy/laravel-s/merges","archive_url":"https://api.github.com/repos/heikezy/laravel-s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heikezy/laravel-s/downloads","issues_url":"https://api.github.com/repos/heikezy/laravel-s/issues{/number}","pulls_url":"https://api.github.com/repos/heikezy/laravel-s/pulls{/number}","milestones_url":"https://api.github.com/repos/heikezy/laravel-s/milestones{/number}","notifications_url":"https://api.github.com/repos/heikezy/laravel-s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heikezy/laravel-s/labels{/name}","releases_url":"https://api.github.com/repos/heikezy/laravel-s/releases{/id}","deployments_url":"https://api.github.com/repos/heikezy/laravel-s/deployments","created_at":"2018-05-15T13:39:17Z","updated_at":"2018-05-15T14:23:58Z","pushed_at":"2018-05-15T14:23:57Z","git_url":"git://github.com/heikezy/laravel-s.git","ssh_url":"git@github.com:heikezy/laravel-s.git","clone_url":"https://github.com/heikezy/laravel-s.git","svn_url":"https://github.com/heikezy/laravel-s","homepage":"","size":1169,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hhxsv5:master","ref":"master","sha":"108a6a0af74749b18ab67d836f568b4974e4eb20","user":{"login":"hhxsv5","id":7278743,"avatar_url":"https://avatars1.githubusercontent.com/u/7278743?v=4","gravatar_id":"","url":"https://api.github.com/users/hhxsv5","html_url":"https://github.com/hhxsv5","followers_url":"https://api.github.com/users/hhxsv5/followers","following_url":"https://api.github.com/users/hhxsv5/following{/other_user}","gists_url":"https://api.github.com/users/hhxsv5/gists{/gist_id}","starred_url":"https://api.github.com/users/hhxsv5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhxsv5/subscriptions","organizations_url":"https://api.github.com/users/hhxsv5/orgs","repos_url":"https://api.github.com/users/hhxsv5/repos","events_url":"https://api.github.com/users/hhxsv5/events{/privacy}","received_events_url":"https://api.github.com/users/hhxsv5/received_events","type":"User","site_admin":false},"repo":{"id":117649937,"name":"laravel-s","full_name":"hhxsv5/laravel-s","owner":{"login":"hhxsv5","id":7278743,"avatar_url":"https://avatars1.githubusercontent.com/u/7278743?v=4","gravatar_id":"","url":"https://api.github.com/users/hhxsv5","html_url":"https://github.com/hhxsv5","followers_url":"https://api.github.com/users/hhxsv5/followers","following_url":"https://api.github.com/users/hhxsv5/following{/other_user}","gists_url":"https://api.github.com/users/hhxsv5/gists{/gist_id}","starred_url":"https://api.github.com/users/hhxsv5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhxsv5/subscriptions","organizations_url":"https://api.github.com/users/hhxsv5/orgs","repos_url":"https://api.github.com/users/hhxsv5/repos","events_url":"https://api.github.com/users/hhxsv5/events{/privacy}","received_events_url":"https://api.github.com/users/hhxsv5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hhxsv5/laravel-s","description":"🚀 LaravelS: speed up Laravel/Lumen by Swoole, let's fly.","fork":false,"url":"https://api.github.com/repos/hhxsv5/laravel-s","forks_url":"https://api.github.com/repos/hhxsv5/laravel-s/forks","keys_url":"https://api.github.com/repos/hhxsv5/laravel-s/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hhxsv5/laravel-s/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hhxsv5/laravel-s/teams","hooks_url":"https://api.github.com/repos/hhxsv5/laravel-s/hooks","issue_events_url":"https://api.github.com/repos/hhxsv5/laravel-s/issues/events{/number}","events_url":"https://api.github.com/repos/hhxsv5/laravel-s/events","assignees_url":"https://api.github.com/repos/hhxsv5/laravel-s/assignees{/user}","branches_url":"https://api.github.com/repos/hhxsv5/laravel-s/branches{/branch}","tags_url":"https://api.github.com/repos/hhxsv5/laravel-s/tags","blobs_url":"https://api.github.com/repos/hhxsv5/laravel-s/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hhxsv5/laravel-s/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hhxsv5/laravel-s/git/refs{/sha}","trees_url":"https://api.github.com/repos/hhxsv5/laravel-s/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hhxsv5/laravel-s/statuses/{sha}","languages_url":"https://api.github.com/repos/hhxsv5/laravel-s/languages","stargazers_url":"https://api.github.com/repos/hhxsv5/laravel-s/stargazers","contributors_url":"https://api.github.com/repos/hhxsv5/laravel-s/contributors","subscribers_url":"https://api.github.com/repos/hhxsv5/laravel-s/subscribers","subscription_url":"https://api.github.com/repos/hhxsv5/laravel-s/subscription","commits_url":"https://api.github.com/repos/hhxsv5/laravel-s/commits{/sha}","git_commits_url":"https://api.github.com/repos/hhxsv5/laravel-s/git/commits{/sha}","comments_url":"https://api.github.com/repos/hhxsv5/laravel-s/comments{/number}","issue_comment_url":"https://api.github.com/repos/hhxsv5/laravel-s/issues/comments{/number}","contents_url":"https://api.github.com/repos/hhxsv5/laravel-s/contents/{+path}","compare_url":"https://api.github.com/repos/hhxsv5/laravel-s/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hhxsv5/laravel-s/merges","archive_url":"https://api.github.com/repos/hhxsv5/laravel-s/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hhxsv5/laravel-s/downloads","issues_url":"https://api.github.com/repos/hhxsv5/laravel-s/issues{/number}","pulls_url":"https://api.github.com/repos/hhxsv5/laravel-s/pulls{/number}","milestones_url":"https://api.github.com/repos/hhxsv5/laravel-s/milestones{/number}","notifications_url":"https://api.github.com/repos/hhxsv5/laravel-s/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hhxsv5/laravel-s/labels{/name}","releases_url":"https://api.github.com/repos/hhxsv5/laravel-s/releases{/id}","deployments_url":"https://api.github.com/repos/hhxsv5/laravel-s/deployments","created_at":"2018-01-16T07:37:04Z","updated_at":"2018-05-16T04:58:30Z","pushed_at":"2018-05-15T14:42:39Z","git_url":"git://github.com/hhxsv5/laravel-s.git","ssh_url":"git@github.com:hhxsv5/laravel-s.git","clone_url":"https://github.com/hhxsv5/laravel-s.git","svn_url":"https://github.com/hhxsv5/laravel-s","homepage":"","size":1159,"stargazers_count":701,"watchers_count":701,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":77,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":77,"open_issues":3,"watchers":701,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38"},"html":{"href":"https://github.com/hhxsv5/laravel-s/pull/38"},"issue":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/issues/38"},"comments":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/hhxsv5/laravel-s/statuses/f6df3a859639b79d4523e3a84b851fd38cba4662"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hhxsv5"}}