{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/comments/52629208","id":52629208,"diff_hunk":"@@ -551,22 +553,24 @@\n \n (s/defn ^:always-validate start\n   [broker :- Broker]\n-  (let [{:keys [activemq-broker]} broker]\n+  (let [{:keys [activemq-broker state]} broker]\n     (mq/start-broker! activemq-broker)\n-    (subscribe-to-queues! broker)))\n+    (subscribe-to-queues! broker)\n+    (reset! state :running)))\n \n (s/defn ^:always-validate stop\n   [broker :- Broker]\n-  (let [{:keys [activemq-broker activemq-consumers]} broker]\n+  (let [{:keys [activemq-broker activemq-consumers state]} broker]\n+    (reset! state :stopping)","path":"src/puppetlabs/pcp/broker/core.clj","position":35,"original_position":35,"commit_id":"f17e94a4c74cf9393f4716bc4bbfaa25b53dce05","original_commit_id":"f17e94a4c74cf9393f4716bc4bbfaa25b53dce05","user":{"login":"kylog","id":1752967,"avatar_url":"https://avatars.githubusercontent.com/u/1752967?v=3","gravatar_id":"","url":"https://api.github.com/users/kylog","html_url":"https://github.com/kylog","followers_url":"https://api.github.com/users/kylog/followers","following_url":"https://api.github.com/users/kylog/following{/other_user}","gists_url":"https://api.github.com/users/kylog/gists{/gist_id}","starred_url":"https://api.github.com/users/kylog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylog/subscriptions","organizations_url":"https://api.github.com/users/kylog/orgs","repos_url":"https://api.github.com/users/kylog/repos","events_url":"https://api.github.com/users/kylog/events{/privacy}","received_events_url":"https://api.github.com/users/kylog/received_events","type":"User","site_admin":false},"body":"Naive question but: is the server ever in an `:idle` state? Or is the thing after `:stopping` the termination of the service (i.e. such that there's no longer anything around to respond to the status endpoint)?","created_at":"2016-02-11T16:47:38Z","updated_at":"2016-02-11T16:47:38Z","html_url":"https://github.com/puppetlabs/pcp-broker/pull/106#discussion_r52629208","pull_request_url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/comments/52629208"},"html":{"href":"https://github.com/puppetlabs/pcp-broker/pull/106#discussion_r52629208"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106","id":59057478,"html_url":"https://github.com/puppetlabs/pcp-broker/pull/106","diff_url":"https://github.com/puppetlabs/pcp-broker/pull/106.diff","patch_url":"https://github.com/puppetlabs/pcp-broker/pull/106.patch","issue_url":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/106","number":106,"state":"open","locked":false,"title":"PCP-295 Track and return the service status","user":{"login":"richardc","id":55650,"avatar_url":"https://avatars.githubusercontent.com/u/55650?v=3","gravatar_id":"","url":"https://api.github.com/users/richardc","html_url":"https://github.com/richardc","followers_url":"https://api.github.com/users/richardc/followers","following_url":"https://api.github.com/users/richardc/following{/other_user}","gists_url":"https://api.github.com/users/richardc/gists{/gist_id}","starred_url":"https://api.github.com/users/richardc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardc/subscriptions","organizations_url":"https://api.github.com/users/richardc/orgs","repos_url":"https://api.github.com/users/richardc/repos","events_url":"https://api.github.com/users/richardc/events{/privacy}","received_events_url":"https://api.github.com/users/richardc/received_events","type":"User","site_admin":false},"body":"Here we make the trapperkeeper-status endpoint more useful by actually tracking\r\nthe broker-service state so we can return a usable value to the server status\r\napi.\r\n\r\n    $ while true ; do  curl -sk https://127.0.0.1:8142/status/v1/services/broker-service | jq \".state\" ; done\r\n    \"starting\"\r\n    \"starting\"\r\n    \"starting\"\r\n    \"starting\"\r\n    \"running\"\r\n    \"running\"","created_at":"2016-02-11T16:38:10Z","updated_at":"2016-02-11T16:47:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f99591e923315e1f200d59441348b7fe4bc8e79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/106/comments","statuses_url":"https://api.github.com/repos/puppetlabs/pcp-broker/statuses/f17e94a4c74cf9393f4716bc4bbfaa25b53dce05","head":{"label":"richardc:PCP-295-fix_status_response","ref":"PCP-295-fix_status_response","sha":"f17e94a4c74cf9393f4716bc4bbfaa25b53dce05","user":{"login":"richardc","id":55650,"avatar_url":"https://avatars.githubusercontent.com/u/55650?v=3","gravatar_id":"","url":"https://api.github.com/users/richardc","html_url":"https://github.com/richardc","followers_url":"https://api.github.com/users/richardc/followers","following_url":"https://api.github.com/users/richardc/following{/other_user}","gists_url":"https://api.github.com/users/richardc/gists{/gist_id}","starred_url":"https://api.github.com/users/richardc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardc/subscriptions","organizations_url":"https://api.github.com/users/richardc/orgs","repos_url":"https://api.github.com/users/richardc/repos","events_url":"https://api.github.com/users/richardc/events{/privacy}","received_events_url":"https://api.github.com/users/richardc/received_events","type":"User","site_admin":false},"repo":{"id":43698590,"name":"pcp-broker","full_name":"richardc/pcp-broker","owner":{"login":"richardc","id":55650,"avatar_url":"https://avatars.githubusercontent.com/u/55650?v=3","gravatar_id":"","url":"https://api.github.com/users/richardc","html_url":"https://github.com/richardc","followers_url":"https://api.github.com/users/richardc/followers","following_url":"https://api.github.com/users/richardc/following{/other_user}","gists_url":"https://api.github.com/users/richardc/gists{/gist_id}","starred_url":"https://api.github.com/users/richardc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardc/subscriptions","organizations_url":"https://api.github.com/users/richardc/orgs","repos_url":"https://api.github.com/users/richardc/repos","events_url":"https://api.github.com/users/richardc/events{/privacy}","received_events_url":"https://api.github.com/users/richardc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richardc/pcp-broker","description":"PCP message broker","fork":true,"url":"https://api.github.com/repos/richardc/pcp-broker","forks_url":"https://api.github.com/repos/richardc/pcp-broker/forks","keys_url":"https://api.github.com/repos/richardc/pcp-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richardc/pcp-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richardc/pcp-broker/teams","hooks_url":"https://api.github.com/repos/richardc/pcp-broker/hooks","issue_events_url":"https://api.github.com/repos/richardc/pcp-broker/issues/events{/number}","events_url":"https://api.github.com/repos/richardc/pcp-broker/events","assignees_url":"https://api.github.com/repos/richardc/pcp-broker/assignees{/user}","branches_url":"https://api.github.com/repos/richardc/pcp-broker/branches{/branch}","tags_url":"https://api.github.com/repos/richardc/pcp-broker/tags","blobs_url":"https://api.github.com/repos/richardc/pcp-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richardc/pcp-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richardc/pcp-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/richardc/pcp-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richardc/pcp-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/richardc/pcp-broker/languages","stargazers_url":"https://api.github.com/repos/richardc/pcp-broker/stargazers","contributors_url":"https://api.github.com/repos/richardc/pcp-broker/contributors","subscribers_url":"https://api.github.com/repos/richardc/pcp-broker/subscribers","subscription_url":"https://api.github.com/repos/richardc/pcp-broker/subscription","commits_url":"https://api.github.com/repos/richardc/pcp-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/richardc/pcp-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/richardc/pcp-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/richardc/pcp-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/richardc/pcp-broker/contents/{+path}","compare_url":"https://api.github.com/repos/richardc/pcp-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richardc/pcp-broker/merges","archive_url":"https://api.github.com/repos/richardc/pcp-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richardc/pcp-broker/downloads","issues_url":"https://api.github.com/repos/richardc/pcp-broker/issues{/number}","pulls_url":"https://api.github.com/repos/richardc/pcp-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/richardc/pcp-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/richardc/pcp-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richardc/pcp-broker/labels{/name}","releases_url":"https://api.github.com/repos/richardc/pcp-broker/releases{/id}","deployments_url":"https://api.github.com/repos/richardc/pcp-broker/deployments","created_at":"2015-10-05T16:36:06Z","updated_at":"2015-10-05T16:36:07Z","pushed_at":"2016-02-11T16:37:58Z","git_url":"git://github.com/richardc/pcp-broker.git","ssh_url":"git@github.com:richardc/pcp-broker.git","clone_url":"https://github.com/richardc/pcp-broker.git","svn_url":"https://github.com/richardc/pcp-broker","homepage":"","size":628,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"puppetlabs:master","ref":"master","sha":"8b75a4951dee26f5aa4883dcdcda9b41e7374e3f","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":22723510,"name":"pcp-broker","full_name":"puppetlabs/pcp-broker","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/pcp-broker","description":"PCP message broker","fork":false,"url":"https://api.github.com/repos/puppetlabs/pcp-broker","forks_url":"https://api.github.com/repos/puppetlabs/pcp-broker/forks","keys_url":"https://api.github.com/repos/puppetlabs/pcp-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/pcp-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/pcp-broker/teams","hooks_url":"https://api.github.com/repos/puppetlabs/pcp-broker/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/pcp-broker/events","assignees_url":"https://api.github.com/repos/puppetlabs/pcp-broker/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/pcp-broker/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/pcp-broker/tags","blobs_url":"https://api.github.com/repos/puppetlabs/pcp-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/pcp-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/pcp-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/pcp-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/pcp-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/pcp-broker/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/pcp-broker/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/pcp-broker/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/pcp-broker/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/pcp-broker/subscription","commits_url":"https://api.github.com/repos/puppetlabs/pcp-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/pcp-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/pcp-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/pcp-broker/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/pcp-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/pcp-broker/merges","archive_url":"https://api.github.com/repos/puppetlabs/pcp-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/pcp-broker/downloads","issues_url":"https://api.github.com/repos/puppetlabs/pcp-broker/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/pcp-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/pcp-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/pcp-broker/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/pcp-broker/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/pcp-broker/deployments","created_at":"2014-08-07T14:07:55Z","updated_at":"2016-01-12T13:22:30Z","pushed_at":"2016-02-11T16:38:11Z","git_url":"git://github.com/puppetlabs/pcp-broker.git","ssh_url":"git@github.com:puppetlabs/pcp-broker.git","clone_url":"https://github.com/puppetlabs/pcp-broker.git","svn_url":"https://github.com/puppetlabs/pcp-broker","homepage":"","size":617,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106"},"html":{"href":"https://github.com/puppetlabs/pcp-broker/pull/106"},"issue":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/106"},"comments":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/pcp-broker/statuses/f17e94a4c74cf9393f4716bc4bbfaa25b53dce05"}}}}