{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/comments/83474718","pull_request_review_id":4318905,"id":83474718,"diff_hunk":"@@ -12,28 +12,45 @@ object Handler {\n     */\n   def handler(q: EventQueue): Process[Engine, QState] = {\n \n-    def handleUserEvent(ue: UserEvent): Engine[QState] = ue match {\n-      case Start => log(\"Output: Started\") *> switch(q)(Status.Running)\n-      case Pause => log(\"Output: Paused\") *> switch(q)(Status.Waiting)\n-      case AddExecution(pend) => log(\"Output: Adding Pending Execution\") // TODO: Implement handler\n-      case Poll => log(\"Output: Polling current state\")\n-      case Exit => log(\"Bye\") *> close(q)\n+    def handleUserEvent(ue: UserEvent): Engine[Unit] = ue match {\n+      case Start              =>\n+        log(\"Output: Started\") *>\n+        switch(q)(Status.Running)\n+      case Pause              =>\n+        log(\"Output: Paused\") *>\n+        switch(q)(Status.Waiting)\n+      case AddExecution(pend) =>\n+        log(\"Output: Adding Pending Execution\") // TODO: Implement handler\n+      case Poll               =>\n+        log(\"Output: Polling current state\")\n+      case Exit               =>\n+        log(\"Bye\") *> close(q)\n     }\n \n-    def handleSystemEvent(se: SystemEvent): Engine[QState] = se match {\n-      case (Completed(i, r)) => log(\"Output: Action completed\") *> complete(i, r)\n-      case (Failed(i, e)) => log(\"Output: Action failed\") *> fail(q)(i, e)\n-      case Executed => log(\"Output: Execution completed, launching next execution\") *> next(q)\n+    def handleSystemEvent(se: SystemEvent): Engine[Unit] = se match {\n+      case (Completed(i, r)) =>\n+        log(\"Output: Action completed\") *>\n+        complete(i, r)\n+      case (Failed(i, e))    =>\n+        log(\"Output: Action failed\") *>\n+        fail(q)(i, e)\n+      case Executed          =>\n+        log(\"Output: Execution completed, launching next execution\") *>\n+        next(q)\n       // TODO: Closing to facilitate testing, in reality it shouldn't close\n-      case Finished => log(\"Output: Finished\") *> close(q)\n+      case Finished          =>\n+        log(\"Output: Finished\") *>\n+        switch(q)(Status.Completed) *>\n+        close(q)\n     }\n \n-    receive(q) >>= (\n+    receive(q).flatMap(\n       ev => Process.eval(\n-        ev match {\n-          case EventUser(ue) => handleUserEvent(ue)\n-          case EventSystem(se) => handleSystemEvent(se)\n-        }\n+        (ev match {","path":"modules/edu.gemini.seqexec.engine/src/main/scala/edu/gemini/seqexec/engine/Handler.scala","position":54,"original_position":54,"commit_id":"b5955d10e5e3354a371d33e21756429dc1de7634","original_commit_id":"b5955d10e5e3354a371d33e21756429dc1de7634","user":{"login":"cquiroz","id":3615303,"avatar_url":"https://avatars.githubusercontent.com/u/3615303?v=3","gravatar_id":"","url":"https://api.github.com/users/cquiroz","html_url":"https://github.com/cquiroz","followers_url":"https://api.github.com/users/cquiroz/followers","following_url":"https://api.github.com/users/cquiroz/following{/other_user}","gists_url":"https://api.github.com/users/cquiroz/gists{/gist_id}","starred_url":"https://api.github.com/users/cquiroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cquiroz/subscriptions","organizations_url":"https://api.github.com/users/cquiroz/orgs","repos_url":"https://api.github.com/users/cquiroz/repos","events_url":"https://api.github.com/users/cquiroz/events{/privacy}","received_events_url":"https://api.github.com/users/cquiroz/received_events","type":"User","site_admin":false},"body":"Is this splitting incoming requests to see if they are user o system? Could it make sense to have different streams instead?","created_at":"2016-10-14T18:16:34Z","updated_at":"2016-10-14T18:42:01Z","html_url":"https://github.com/gemini-hlsw/ocs3/pull/99#discussion_r83474718","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/comments/83474718"},"html":{"href":"https://github.com/gemini-hlsw/ocs3/pull/99#discussion_r83474718"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99","id":89395351,"html_url":"https://github.com/gemini-hlsw/ocs3/pull/99","diff_url":"https://github.com/gemini-hlsw/ocs3/pull/99.diff","patch_url":"https://github.com/gemini-hlsw/ocs3/pull/99.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/99","number":99,"state":"open","locked":false,"title":"SEQNG-21 SEQNG-17 SEQNG-20 New internal Engine state and Process of `SequenceView`s","user":{"login":"jdnavarro","id":215438,"avatar_url":"https://avatars.githubusercontent.com/u/215438?v=3","gravatar_id":"","url":"https://api.github.com/users/jdnavarro","html_url":"https://github.com/jdnavarro","followers_url":"https://api.github.com/users/jdnavarro/followers","following_url":"https://api.github.com/users/jdnavarro/following{/other_user}","gists_url":"https://api.github.com/users/jdnavarro/gists{/gist_id}","starred_url":"https://api.github.com/users/jdnavarro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdnavarro/subscriptions","organizations_url":"https://api.github.com/users/jdnavarro/orgs","repos_url":"https://api.github.com/users/jdnavarro/repos","events_url":"https://api.github.com/users/jdnavarro/events{/privacy}","received_events_url":"https://api.github.com/users/jdnavarro/received_events","type":"User","site_admin":false},"body":"This includes the new triple Zipper structure for the Engine state and the generation of a minimal output from the engine state needed by the web server.\r\n\r\nPrevious PR #94 included a review for the Zipper structure. Since then, there has been some changes, including feedback from the review, but the fundamentals are the same.\r\n\r\nIt also includes the `Process` generates the output states needed by the web server.\r\n\r\n~~The commits from #98 are here because SEQNG-21 depends on them. Please, review #98 before this one, so that I can merge it and only the specific commits for SEQNG-21 show up in this PR.~~","created_at":"2016-10-14T14:33:22Z","updated_at":"2016-10-14T18:42:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0c5c5a9c384eff6ae9f4959be9be706ecfb466c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/99/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs3/statuses/b5955d10e5e3354a371d33e21756429dc1de7634","head":{"label":"jdnavarro:feature/SEQNG-21","ref":"feature/SEQNG-21","sha":"b5955d10e5e3354a371d33e21756429dc1de7634","user":{"login":"jdnavarro","id":215438,"avatar_url":"https://avatars.githubusercontent.com/u/215438?v=3","gravatar_id":"","url":"https://api.github.com/users/jdnavarro","html_url":"https://github.com/jdnavarro","followers_url":"https://api.github.com/users/jdnavarro/followers","following_url":"https://api.github.com/users/jdnavarro/following{/other_user}","gists_url":"https://api.github.com/users/jdnavarro/gists{/gist_id}","starred_url":"https://api.github.com/users/jdnavarro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdnavarro/subscriptions","organizations_url":"https://api.github.com/users/jdnavarro/orgs","repos_url":"https://api.github.com/users/jdnavarro/repos","events_url":"https://api.github.com/users/jdnavarro/events{/privacy}","received_events_url":"https://api.github.com/users/jdnavarro/received_events","type":"User","site_admin":false},"repo":{"id":62576774,"name":"ocs3","full_name":"jdnavarro/ocs3","owner":{"login":"jdnavarro","id":215438,"avatar_url":"https://avatars.githubusercontent.com/u/215438?v=3","gravatar_id":"","url":"https://api.github.com/users/jdnavarro","html_url":"https://github.com/jdnavarro","followers_url":"https://api.github.com/users/jdnavarro/followers","following_url":"https://api.github.com/users/jdnavarro/following{/other_user}","gists_url":"https://api.github.com/users/jdnavarro/gists{/gist_id}","starred_url":"https://api.github.com/users/jdnavarro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdnavarro/subscriptions","organizations_url":"https://api.github.com/users/jdnavarro/orgs","repos_url":"https://api.github.com/users/jdnavarro/repos","events_url":"https://api.github.com/users/jdnavarro/events{/privacy}","received_events_url":"https://api.github.com/users/jdnavarro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdnavarro/ocs3","description":"Observatory Control Software - New Generation","fork":true,"url":"https://api.github.com/repos/jdnavarro/ocs3","forks_url":"https://api.github.com/repos/jdnavarro/ocs3/forks","keys_url":"https://api.github.com/repos/jdnavarro/ocs3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdnavarro/ocs3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdnavarro/ocs3/teams","hooks_url":"https://api.github.com/repos/jdnavarro/ocs3/hooks","issue_events_url":"https://api.github.com/repos/jdnavarro/ocs3/issues/events{/number}","events_url":"https://api.github.com/repos/jdnavarro/ocs3/events","assignees_url":"https://api.github.com/repos/jdnavarro/ocs3/assignees{/user}","branches_url":"https://api.github.com/repos/jdnavarro/ocs3/branches{/branch}","tags_url":"https://api.github.com/repos/jdnavarro/ocs3/tags","blobs_url":"https://api.github.com/repos/jdnavarro/ocs3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdnavarro/ocs3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdnavarro/ocs3/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdnavarro/ocs3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdnavarro/ocs3/statuses/{sha}","languages_url":"https://api.github.com/repos/jdnavarro/ocs3/languages","stargazers_url":"https://api.github.com/repos/jdnavarro/ocs3/stargazers","contributors_url":"https://api.github.com/repos/jdnavarro/ocs3/contributors","subscribers_url":"https://api.github.com/repos/jdnavarro/ocs3/subscribers","subscription_url":"https://api.github.com/repos/jdnavarro/ocs3/subscription","commits_url":"https://api.github.com/repos/jdnavarro/ocs3/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdnavarro/ocs3/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdnavarro/ocs3/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdnavarro/ocs3/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdnavarro/ocs3/contents/{+path}","compare_url":"https://api.github.com/repos/jdnavarro/ocs3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdnavarro/ocs3/merges","archive_url":"https://api.github.com/repos/jdnavarro/ocs3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdnavarro/ocs3/downloads","issues_url":"https://api.github.com/repos/jdnavarro/ocs3/issues{/number}","pulls_url":"https://api.github.com/repos/jdnavarro/ocs3/pulls{/number}","milestones_url":"https://api.github.com/repos/jdnavarro/ocs3/milestones{/number}","notifications_url":"https://api.github.com/repos/jdnavarro/ocs3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdnavarro/ocs3/labels{/name}","releases_url":"https://api.github.com/repos/jdnavarro/ocs3/releases{/id}","deployments_url":"https://api.github.com/repos/jdnavarro/ocs3/deployments","created_at":"2016-07-04T16:57:22Z","updated_at":"2016-07-04T16:57:24Z","pushed_at":"2016-10-14T17:56:09Z","git_url":"git://github.com/jdnavarro/ocs3.git","ssh_url":"git@github.com:jdnavarro/ocs3.git","clone_url":"https://github.com/jdnavarro/ocs3.git","svn_url":"https://github.com/jdnavarro/ocs3","homepage":null,"size":4195,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"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":"develop"}},"base":{"label":"gemini-hlsw:feature/engine","ref":"feature/engine","sha":"3fa1aca28b09ce304ee94e4f1f7363936ba5c876","user":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"repo":{"id":54653732,"name":"ocs3","full_name":"gemini-hlsw/ocs3","owner":{"login":"gemini-hlsw","id":8593735,"avatar_url":"https://avatars.githubusercontent.com/u/8593735?v=3","gravatar_id":"","url":"https://api.github.com/users/gemini-hlsw","html_url":"https://github.com/gemini-hlsw","followers_url":"https://api.github.com/users/gemini-hlsw/followers","following_url":"https://api.github.com/users/gemini-hlsw/following{/other_user}","gists_url":"https://api.github.com/users/gemini-hlsw/gists{/gist_id}","starred_url":"https://api.github.com/users/gemini-hlsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gemini-hlsw/subscriptions","organizations_url":"https://api.github.com/users/gemini-hlsw/orgs","repos_url":"https://api.github.com/users/gemini-hlsw/repos","events_url":"https://api.github.com/users/gemini-hlsw/events{/privacy}","received_events_url":"https://api.github.com/users/gemini-hlsw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gemini-hlsw/ocs3","description":"Observatory Control Software - New Generation","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs3","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs3/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs3/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs3/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs3/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs3/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs3/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs3/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs3/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs3/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs3/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs3/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs3/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs3/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs3/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs3/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs3/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs3/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs3/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs3/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs3/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs3/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs3/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs3/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs3/releases{/id}","deployments_url":"https://api.github.com/repos/gemini-hlsw/ocs3/deployments","created_at":"2016-03-24T15:40:39Z","updated_at":"2016-07-27T09:26:57Z","pushed_at":"2016-10-14T17:56:09Z","git_url":"git://github.com/gemini-hlsw/ocs3.git","ssh_url":"git@github.com:gemini-hlsw/ocs3.git","clone_url":"https://github.com/gemini-hlsw/ocs3.git","svn_url":"https://github.com/gemini-hlsw/ocs3","homepage":null,"size":4264,"stargazers_count":3,"watchers_count":3,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99"},"html":{"href":"https://github.com/gemini-hlsw/ocs3/pull/99"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/99"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs3/statuses/b5955d10e5e3354a371d33e21756429dc1de7634"}}}}
{"actor":{"display_login":"cquiroz"}}