{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/121399446","pull_request_review_id":43444070,"id":121399446,"diff_hunk":"@@ -164,112 +187,121 @@ private void restartJobs() {\n         if (schedulerFuture != null && !schedulerFuture.isCancelled()) {\n             schedulerFuture.cancel(true);\n         }\n-\n-        schedulerFuture = scheduler.schedule(new Runnable() {\n-            @Override\n-            public void run() {\n+        if (localExecutor != null) {\n+            localExecutor.shutdownNow();\n+        }\n+        localExecutor = Executors.newSingleThreadExecutor();","path":"extensions/binding/org.eclipse.smarthome.binding.astro/src/main/java/org/eclipse/smarthome/binding/astro/handler/AstroThingHandler.java","position":169,"original_position":173,"commit_id":"0d627fba7a7970c697b94dac486fe66bce38b25c","original_commit_id":"7ffd9760b7ea315f39608e47a424e960c20b3f1a","user":{"login":"kaikreuzer","id":3244965,"avatar_url":"https://avatars0.githubusercontent.com/u/3244965?v=3","gravatar_id":"","url":"https://api.github.com/users/kaikreuzer","html_url":"https://github.com/kaikreuzer","followers_url":"https://api.github.com/users/kaikreuzer/followers","following_url":"https://api.github.com/users/kaikreuzer/following{/other_user}","gists_url":"https://api.github.com/users/kaikreuzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaikreuzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaikreuzer/subscriptions","organizations_url":"https://api.github.com/users/kaikreuzer/orgs","repos_url":"https://api.github.com/users/kaikreuzer/repos","events_url":"https://api.github.com/users/kaikreuzer/events{/privacy}","received_events_url":"https://api.github.com/users/kaikreuzer/received_events","type":"User","site_admin":false},"body":"No, that would be even worse as we would spawn two additional threads, not just one.\r\nI was under the impression that we are talking about a few milliseconds execution time for any of these jobs, so having them executed right here shouldn't really cause any delay.\r\nBut ok, to keep the \"restartJobs\" method clean, I can also live with having them submitted to be executed asynchronously. So let's leave it as it is.","created_at":"2017-06-12T13:58:59Z","updated_at":"2017-06-12T13:58:59Z","html_url":"https://github.com/eclipse/smarthome/pull/3503#discussion_r121399446","pull_request_url":"https://api.github.com/repos/eclipse/smarthome/pulls/3503","_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments/121399446"},"html":{"href":"https://github.com/eclipse/smarthome/pull/3503#discussion_r121399446"},"pull_request":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/3503"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/3503","id":121953856,"html_url":"https://github.com/eclipse/smarthome/pull/3503","diff_url":"https://github.com/eclipse/smarthome/pull/3503.diff","patch_url":"https://github.com/eclipse/smarthome/pull/3503.patch","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/3503","number":3503,"state":"open","locked":false,"title":"Astro-Binding compliance with ESH Scheduler","user":{"login":"amitjoy","id":13380182,"avatar_url":"https://avatars3.githubusercontent.com/u/13380182?v=3","gravatar_id":"","url":"https://api.github.com/users/amitjoy","html_url":"https://github.com/amitjoy","followers_url":"https://api.github.com/users/amitjoy/followers","following_url":"https://api.github.com/users/amitjoy/following{/other_user}","gists_url":"https://api.github.com/users/amitjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitjoy/subscriptions","organizations_url":"https://api.github.com/users/amitjoy/orgs","repos_url":"https://api.github.com/users/amitjoy/repos","events_url":"https://api.github.com/users/amitjoy/events{/privacy}","received_events_url":"https://api.github.com/users/amitjoy/received_events","type":"User","site_admin":false},"body":"1. Added New Simplified Job API\r\n2. Adapted Previous Jobs to new API\r\n3. Removed Quartz Dependencies\r\n4. Added CRON Helper Tests\r\n5. Compact Profile 2 Compliance\r\n6. Code Refactorings","created_at":"2017-05-23T09:38:57Z","updated_at":"2017-06-12T13:58:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cedaccff95e4eb691ac6b948551b1ffc68b782ac","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/smarthome/pulls/3503/commits","review_comments_url":"https://api.github.com/repos/eclipse/smarthome/pulls/3503/comments","review_comment_url":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/3503/comments","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/0d627fba7a7970c697b94dac486fe66bce38b25c","head":{"label":"amitjoy:PR_astro_binding","ref":"PR_astro_binding","sha":"0d627fba7a7970c697b94dac486fe66bce38b25c","user":{"login":"amitjoy","id":13380182,"avatar_url":"https://avatars3.githubusercontent.com/u/13380182?v=3","gravatar_id":"","url":"https://api.github.com/users/amitjoy","html_url":"https://github.com/amitjoy","followers_url":"https://api.github.com/users/amitjoy/followers","following_url":"https://api.github.com/users/amitjoy/following{/other_user}","gists_url":"https://api.github.com/users/amitjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitjoy/subscriptions","organizations_url":"https://api.github.com/users/amitjoy/orgs","repos_url":"https://api.github.com/users/amitjoy/repos","events_url":"https://api.github.com/users/amitjoy/events{/privacy}","received_events_url":"https://api.github.com/users/amitjoy/received_events","type":"User","site_admin":false},"repo":{"id":89492625,"name":"smarthome","full_name":"amitjoy/smarthome","owner":{"login":"amitjoy","id":13380182,"avatar_url":"https://avatars3.githubusercontent.com/u/13380182?v=3","gravatar_id":"","url":"https://api.github.com/users/amitjoy","html_url":"https://github.com/amitjoy","followers_url":"https://api.github.com/users/amitjoy/followers","following_url":"https://api.github.com/users/amitjoy/following{/other_user}","gists_url":"https://api.github.com/users/amitjoy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitjoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitjoy/subscriptions","organizations_url":"https://api.github.com/users/amitjoy/orgs","repos_url":"https://api.github.com/users/amitjoy/repos","events_url":"https://api.github.com/users/amitjoy/events{/privacy}","received_events_url":"https://api.github.com/users/amitjoy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amitjoy/smarthome","description":"Eclipse SmartHome™ project","fork":true,"url":"https://api.github.com/repos/amitjoy/smarthome","forks_url":"https://api.github.com/repos/amitjoy/smarthome/forks","keys_url":"https://api.github.com/repos/amitjoy/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amitjoy/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amitjoy/smarthome/teams","hooks_url":"https://api.github.com/repos/amitjoy/smarthome/hooks","issue_events_url":"https://api.github.com/repos/amitjoy/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/amitjoy/smarthome/events","assignees_url":"https://api.github.com/repos/amitjoy/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/amitjoy/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/amitjoy/smarthome/tags","blobs_url":"https://api.github.com/repos/amitjoy/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amitjoy/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amitjoy/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/amitjoy/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amitjoy/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/amitjoy/smarthome/languages","stargazers_url":"https://api.github.com/repos/amitjoy/smarthome/stargazers","contributors_url":"https://api.github.com/repos/amitjoy/smarthome/contributors","subscribers_url":"https://api.github.com/repos/amitjoy/smarthome/subscribers","subscription_url":"https://api.github.com/repos/amitjoy/smarthome/subscription","commits_url":"https://api.github.com/repos/amitjoy/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/amitjoy/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/amitjoy/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/amitjoy/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/amitjoy/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/amitjoy/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amitjoy/smarthome/merges","archive_url":"https://api.github.com/repos/amitjoy/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amitjoy/smarthome/downloads","issues_url":"https://api.github.com/repos/amitjoy/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/amitjoy/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/amitjoy/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/amitjoy/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amitjoy/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/amitjoy/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/amitjoy/smarthome/deployments","created_at":"2017-04-26T14:47:47Z","updated_at":"2017-04-26T14:47:57Z","pushed_at":"2017-06-12T11:46:35Z","git_url":"git://github.com/amitjoy/smarthome.git","ssh_url":"git@github.com:amitjoy/smarthome.git","clone_url":"https://github.com/amitjoy/smarthome.git","svn_url":"https://github.com/amitjoy/smarthome","homepage":"https://www.eclipse.org/smarthome/","size":29895,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"ad148bb09e0d13657a71d72c3c233b21c747ab55","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":15778981,"name":"smarthome","full_name":"eclipse/smarthome","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars2.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/smarthome","description":"Eclipse SmartHome™ project","fork":false,"url":"https://api.github.com/repos/eclipse/smarthome","forks_url":"https://api.github.com/repos/eclipse/smarthome/forks","keys_url":"https://api.github.com/repos/eclipse/smarthome/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/smarthome/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/smarthome/teams","hooks_url":"https://api.github.com/repos/eclipse/smarthome/hooks","issue_events_url":"https://api.github.com/repos/eclipse/smarthome/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/smarthome/events","assignees_url":"https://api.github.com/repos/eclipse/smarthome/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/smarthome/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/smarthome/tags","blobs_url":"https://api.github.com/repos/eclipse/smarthome/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/smarthome/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/smarthome/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/smarthome/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/smarthome/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/smarthome/languages","stargazers_url":"https://api.github.com/repos/eclipse/smarthome/stargazers","contributors_url":"https://api.github.com/repos/eclipse/smarthome/contributors","subscribers_url":"https://api.github.com/repos/eclipse/smarthome/subscribers","subscription_url":"https://api.github.com/repos/eclipse/smarthome/subscription","commits_url":"https://api.github.com/repos/eclipse/smarthome/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/smarthome/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/smarthome/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/smarthome/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/smarthome/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/smarthome/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/smarthome/merges","archive_url":"https://api.github.com/repos/eclipse/smarthome/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/smarthome/downloads","issues_url":"https://api.github.com/repos/eclipse/smarthome/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/smarthome/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/smarthome/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/smarthome/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/smarthome/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/smarthome/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/smarthome/deployments","created_at":"2014-01-09T20:47:19Z","updated_at":"2017-06-12T02:22:24Z","pushed_at":"2017-06-12T11:46:38Z","git_url":"git://github.com/eclipse/smarthome.git","ssh_url":"git@github.com:eclipse/smarthome.git","clone_url":"https://github.com/eclipse/smarthome.git","svn_url":"https://github.com/eclipse/smarthome","homepage":"https://www.eclipse.org/smarthome/","size":33261,"stargazers_count":508,"watchers_count":508,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":490,"mirror_url":null,"open_issues_count":312,"forks":490,"open_issues":312,"watchers":508,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/3503"},"html":{"href":"https://github.com/eclipse/smarthome/pull/3503"},"issue":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/3503"},"comments":{"href":"https://api.github.com/repos/eclipse/smarthome/issues/3503/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/3503/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/smarthome/pulls/3503/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/smarthome/statuses/0d627fba7a7970c697b94dac486fe66bce38b25c"}}}}
{"actor":{"display_login":"kaikreuzer"}}