{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/beats/pulls/comments/213298841","pull_request_review_id":150102180,"id":213298841,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzI5ODg0MQ==","diff_hunk":"@@ -105,27 +113,32 @@ func NewWithLocation(limit uint, location *time.Location) *Scheduler {\n }\n \n func (s *Scheduler) Start() error {\n-\tif s.running {\n-\t\treturn errors.New(\"scheduler already running\")\n+\tif !s.transitionRunning() {\n+\t\treturn errors.New(\"scheduler already state\")","path":"heartbeat/scheduler/scheduler.go","position":71,"original_position":71,"commit_id":"ad3d0cad010dbdf3b74cbe3779cfb14068652384","original_commit_id":"ad3d0cad010dbdf3b74cbe3779cfb14068652384","user":{"login":"ruflin","id":244900,"node_id":"MDQ6VXNlcjI0NDkwMA==","avatar_url":"https://avatars3.githubusercontent.com/u/244900?v=4","gravatar_id":"","url":"https://api.github.com/users/ruflin","html_url":"https://github.com/ruflin","followers_url":"https://api.github.com/users/ruflin/followers","following_url":"https://api.github.com/users/ruflin/following{/other_user}","gists_url":"https://api.github.com/users/ruflin/gists{/gist_id}","starred_url":"https://api.github.com/users/ruflin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruflin/subscriptions","organizations_url":"https://api.github.com/users/ruflin/orgs","repos_url":"https://api.github.com/users/ruflin/repos","events_url":"https://api.github.com/users/ruflin/events{/privacy}","received_events_url":"https://api.github.com/users/ruflin/received_events","type":"User","site_admin":false},"body":"should the current state be part of this error?","created_at":"2018-08-28T12:48:32Z","updated_at":"2018-08-28T12:52:43Z","html_url":"https://github.com/elastic/beats/pull/8073#discussion_r213298841","pull_request_url":"https://api.github.com/repos/elastic/beats/pulls/8073","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments/213298841"},"html":{"href":"https://github.com/elastic/beats/pull/8073#discussion_r213298841"},"pull_request":{"href":"https://api.github.com/repos/elastic/beats/pulls/8073"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/8073","id":210631254,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNjMxMjU0","html_url":"https://github.com/elastic/beats/pull/8073","diff_url":"https://github.com/elastic/beats/pull/8073.diff","patch_url":"https://github.com/elastic/beats/pull/8073.patch","issue_url":"https://api.github.com/repos/elastic/beats/issues/8073","number":8073,"state":"open","locked":false,"title":"Heartbeat Scheduler Tests","user":{"login":"andrewvc","id":131427,"node_id":"MDQ6VXNlcjEzMTQyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/131427?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"body":"This commit aims to improve test coverage of these important packages.\r\n\r\nIt also makes some tiny changes to scheduler.go to improve understanding of some of the code.\r\n","created_at":"2018-08-24T03:39:13Z","updated_at":"2018-08-28T12:52:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9baf2e1bffe92b28f6af297edda72b391b4d4b9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":364269915,"node_id":"MDU6TGFiZWwzNjQyNjk5MTU=","url":"https://api.github.com/repos/elastic/beats/labels/:Testing","name":":Testing","color":"ffffff","default":false},{"id":459123149,"node_id":"MDU6TGFiZWw0NTkxMjMxNDk=","url":"https://api.github.com/repos/elastic/beats/labels/Heartbeat","name":"Heartbeat","color":"008000","default":false},{"id":228068770,"node_id":"MDU6TGFiZWwyMjgwNjg3NzA=","url":"https://api.github.com/repos/elastic/beats/labels/review","name":"review","color":"207de5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/beats/pulls/8073/commits","review_comments_url":"https://api.github.com/repos/elastic/beats/pulls/8073/comments","review_comment_url":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/beats/issues/8073/comments","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/ad3d0cad010dbdf3b74cbe3779cfb14068652384","head":{"label":"andrewvc:hbschedtest","ref":"hbschedtest","sha":"ad3d0cad010dbdf3b74cbe3779cfb14068652384","user":{"login":"andrewvc","id":131427,"node_id":"MDQ6VXNlcjEzMTQyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/131427?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"repo":{"id":119769836,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk3Njk4MzY=","name":"beats","full_name":"andrewvc/beats","owner":{"login":"andrewvc","id":131427,"node_id":"MDQ6VXNlcjEzMTQyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/131427?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewvc","html_url":"https://github.com/andrewvc","followers_url":"https://api.github.com/users/andrewvc/followers","following_url":"https://api.github.com/users/andrewvc/following{/other_user}","gists_url":"https://api.github.com/users/andrewvc/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewvc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewvc/subscriptions","organizations_url":"https://api.github.com/users/andrewvc/orgs","repos_url":"https://api.github.com/users/andrewvc/repos","events_url":"https://api.github.com/users/andrewvc/events{/privacy}","received_events_url":"https://api.github.com/users/andrewvc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewvc/beats","description":":tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash ","fork":true,"url":"https://api.github.com/repos/andrewvc/beats","forks_url":"https://api.github.com/repos/andrewvc/beats/forks","keys_url":"https://api.github.com/repos/andrewvc/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewvc/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewvc/beats/teams","hooks_url":"https://api.github.com/repos/andrewvc/beats/hooks","issue_events_url":"https://api.github.com/repos/andrewvc/beats/issues/events{/number}","events_url":"https://api.github.com/repos/andrewvc/beats/events","assignees_url":"https://api.github.com/repos/andrewvc/beats/assignees{/user}","branches_url":"https://api.github.com/repos/andrewvc/beats/branches{/branch}","tags_url":"https://api.github.com/repos/andrewvc/beats/tags","blobs_url":"https://api.github.com/repos/andrewvc/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewvc/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewvc/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewvc/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewvc/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewvc/beats/languages","stargazers_url":"https://api.github.com/repos/andrewvc/beats/stargazers","contributors_url":"https://api.github.com/repos/andrewvc/beats/contributors","subscribers_url":"https://api.github.com/repos/andrewvc/beats/subscribers","subscription_url":"https://api.github.com/repos/andrewvc/beats/subscription","commits_url":"https://api.github.com/repos/andrewvc/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewvc/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewvc/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewvc/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewvc/beats/contents/{+path}","compare_url":"https://api.github.com/repos/andrewvc/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewvc/beats/merges","archive_url":"https://api.github.com/repos/andrewvc/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewvc/beats/downloads","issues_url":"https://api.github.com/repos/andrewvc/beats/issues{/number}","pulls_url":"https://api.github.com/repos/andrewvc/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewvc/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewvc/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewvc/beats/labels{/name}","releases_url":"https://api.github.com/repos/andrewvc/beats/releases{/id}","deployments_url":"https://api.github.com/repos/andrewvc/beats/deployments","created_at":"2018-02-01T02:11:47Z","updated_at":"2018-02-01T02:11:55Z","pushed_at":"2018-08-27T18:22:00Z","git_url":"git://github.com/andrewvc/beats.git","ssh_url":"git@github.com:andrewvc/beats.git","clone_url":"https://github.com/andrewvc/beats.git","svn_url":"https://github.com/andrewvc/beats","homepage":"https://www.elastic.co/products/beats","size":88036,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"e1d8c15ac1cb8dc8fea8f5b23dc299e669ad4585","user":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":16554739,"node_id":"MDEwOlJlcG9zaXRvcnkxNjU1NDczOQ==","name":"beats","full_name":"elastic/beats","owner":{"login":"elastic","id":6764390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY3NjQzOTA=","avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/beats","description":":tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash ","fork":false,"url":"https://api.github.com/repos/elastic/beats","forks_url":"https://api.github.com/repos/elastic/beats/forks","keys_url":"https://api.github.com/repos/elastic/beats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/beats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/beats/teams","hooks_url":"https://api.github.com/repos/elastic/beats/hooks","issue_events_url":"https://api.github.com/repos/elastic/beats/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/beats/events","assignees_url":"https://api.github.com/repos/elastic/beats/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/beats/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/beats/tags","blobs_url":"https://api.github.com/repos/elastic/beats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/beats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/beats/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/beats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/beats/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/beats/languages","stargazers_url":"https://api.github.com/repos/elastic/beats/stargazers","contributors_url":"https://api.github.com/repos/elastic/beats/contributors","subscribers_url":"https://api.github.com/repos/elastic/beats/subscribers","subscription_url":"https://api.github.com/repos/elastic/beats/subscription","commits_url":"https://api.github.com/repos/elastic/beats/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/beats/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/beats/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/beats/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/beats/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/beats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/beats/merges","archive_url":"https://api.github.com/repos/elastic/beats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/beats/downloads","issues_url":"https://api.github.com/repos/elastic/beats/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/beats/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/beats/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/beats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/beats/labels{/name}","releases_url":"https://api.github.com/repos/elastic/beats/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/beats/deployments","created_at":"2014-02-05T19:01:02Z","updated_at":"2018-08-28T12:18:05Z","pushed_at":"2018-08-28T11:46:25Z","git_url":"git://github.com/elastic/beats.git","ssh_url":"git@github.com:elastic/beats.git","clone_url":"https://github.com/elastic/beats.git","svn_url":"https://github.com/elastic/beats","homepage":"https://www.elastic.co/products/beats","size":89577,"stargazers_count":6054,"watchers_count":6054,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1875,"mirror_url":null,"archived":false,"open_issues_count":904,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1875,"open_issues":904,"watchers":6054,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/beats/pulls/8073"},"html":{"href":"https://github.com/elastic/beats/pull/8073"},"issue":{"href":"https://api.github.com/repos/elastic/beats/issues/8073"},"comments":{"href":"https://api.github.com/repos/elastic/beats/issues/8073/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/beats/pulls/8073/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/beats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/beats/pulls/8073/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/beats/statuses/ad3d0cad010dbdf3b74cbe3779cfb14068652384"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ruflin"}}