{"action":"created","comment":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/31427342","id":31427342,"diff_hunk":"@@ -0,0 +1,49 @@\n+package edu.gemini.seqexec.server\n+\n+import edu.gemini.seqexec.server.SeqexecFailure._\n+import edu.gemini.spModel.config2.{Config, ConfigSequence, ItemKey}\n+import edu.gemini.spModel.obscomp.InstConstants.INSTRUMENT_NAME_PROP\n+import edu.gemini.spModel.seqcomp.SeqConfigNames.INSTRUMENT_KEY\n+\n+import scalaz._\n+import Scalaz._\n+\n+import scalaz.concurrent.Task\n+\n+/**\n+ * Created by jluhrs on 4/28/15.\n+ */\n+final class Executor(sequenceConfig: ConfigSequence) {\n+\n+  def run: \\/[Throwable, List[StepResult]] = runSequence(sequenceConfig.getAllSteps.toList).attemptRun\n+\n+  private def runSequence(config: List[Config]): Task[List[StepResult]] = {\n+    (config map (runStep(_))).sequenceU\n+  }\n+\n+  private def runStep(stepConfig: Config): Task[StepResult] = {\n+    val instName = stepConfig.getItemValue(new ItemKey(INSTRUMENT_KEY, INSTRUMENT_NAME_PROP))\n+    val instrument = instName match {\n+      case GMOS_S.name => Some(GMOS_S)\n+      case _           => None\n+    }\n+\n+    instrument map (a => {\n+      val systems: List[System] = List(TCS, a)\n+      for {\n+        r <- Task.gatherUnordered( systems map (x => x.configure(stepConfig)) , true)","path":"bundle/edu.gemini.seqexec.server/src/main/scala/edu/gemini/seqexec/server/Executor.scala","position":34,"original_position":34,"commit_id":"718c0d7405a1e37fd7c42b737ac5ff2a6f539914","original_commit_id":"718c0d7405a1e37fd7c42b737ac5ff2a6f539914","user":{"login":"swalker2m","id":4906023,"avatar_url":"https://avatars.githubusercontent.com/u/4906023?v=3","gravatar_id":"","url":"https://api.github.com/users/swalker2m","html_url":"https://github.com/swalker2m","followers_url":"https://api.github.com/users/swalker2m/followers","following_url":"https://api.github.com/users/swalker2m/following{/other_user}","gists_url":"https://api.github.com/users/swalker2m/gists{/gist_id}","starred_url":"https://api.github.com/users/swalker2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalker2m/subscriptions","organizations_url":"https://api.github.com/users/swalker2m/orgs","repos_url":"https://api.github.com/users/swalker2m/repos","events_url":"https://api.github.com/users/swalker2m/events{/privacy}","received_events_url":"https://api.github.com/users/swalker2m/received_events","type":"User","site_admin":false},"body":"`Task.gatherUnordered(systems.map(_.configure(stepConfig)), true)`","created_at":"2015-06-01T13:59:53Z","updated_at":"2015-06-01T13:59:53Z","html_url":"https://github.com/gemini-hlsw/ocs/pull/344#discussion_r31427342","pull_request_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344","_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments/31427342"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/344#discussion_r31427342"},"pull_request":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344"}}},"pull_request":{"url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344","id":34498153,"html_url":"https://github.com/gemini-hlsw/ocs/pull/344","diff_url":"https://github.com/gemini-hlsw/ocs/pull/344.diff","patch_url":"https://github.com/gemini-hlsw/ocs/pull/344.patch","issue_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/344","number":344,"state":"open","locked":false,"title":"OCSADV-275: Basic sequence executor","user":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"body":"First ultra very mucho simple implementation of a sequence execution.\r\nIncludes Shane's code to get the sequences from the ODB.","created_at":"2015-04-30T20:33:57Z","updated_at":"2015-06-01T13:59:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a33a041ec6e4875879fca1493b32ee1249ef66c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344/commits","review_comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344/comments","review_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/344/comments","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/718c0d7405a1e37fd7c42b737ac5ff2a6f539914","head":{"label":"jluhrs:feature/OCSADV-275","ref":"feature/OCSADV-275","sha":"718c0d7405a1e37fd7c42b737ac5ff2a6f539914","user":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"repo":{"id":24510249,"name":"ocs","full_name":"jluhrs/ocs","owner":{"login":"jluhrs","id":7621164,"avatar_url":"https://avatars.githubusercontent.com/u/7621164?v=3","gravatar_id":"","url":"https://api.github.com/users/jluhrs","html_url":"https://github.com/jluhrs","followers_url":"https://api.github.com/users/jluhrs/followers","following_url":"https://api.github.com/users/jluhrs/following{/other_user}","gists_url":"https://api.github.com/users/jluhrs/gists{/gist_id}","starred_url":"https://api.github.com/users/jluhrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jluhrs/subscriptions","organizations_url":"https://api.github.com/users/jluhrs/orgs","repos_url":"https://api.github.com/users/jluhrs/repos","events_url":"https://api.github.com/users/jluhrs/events{/privacy}","received_events_url":"https://api.github.com/users/jluhrs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jluhrs/ocs","description":"","fork":true,"url":"https://api.github.com/repos/jluhrs/ocs","forks_url":"https://api.github.com/repos/jluhrs/ocs/forks","keys_url":"https://api.github.com/repos/jluhrs/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jluhrs/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jluhrs/ocs/teams","hooks_url":"https://api.github.com/repos/jluhrs/ocs/hooks","issue_events_url":"https://api.github.com/repos/jluhrs/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/jluhrs/ocs/events","assignees_url":"https://api.github.com/repos/jluhrs/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/jluhrs/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/jluhrs/ocs/tags","blobs_url":"https://api.github.com/repos/jluhrs/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jluhrs/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jluhrs/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jluhrs/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jluhrs/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/jluhrs/ocs/languages","stargazers_url":"https://api.github.com/repos/jluhrs/ocs/stargazers","contributors_url":"https://api.github.com/repos/jluhrs/ocs/contributors","subscribers_url":"https://api.github.com/repos/jluhrs/ocs/subscribers","subscription_url":"https://api.github.com/repos/jluhrs/ocs/subscription","commits_url":"https://api.github.com/repos/jluhrs/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jluhrs/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jluhrs/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jluhrs/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jluhrs/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/jluhrs/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jluhrs/ocs/merges","archive_url":"https://api.github.com/repos/jluhrs/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jluhrs/ocs/downloads","issues_url":"https://api.github.com/repos/jluhrs/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/jluhrs/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/jluhrs/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/jluhrs/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jluhrs/ocs/labels{/name}","releases_url":"https://api.github.com/repos/jluhrs/ocs/releases{/id}","created_at":"2014-09-26T18:14:26Z","updated_at":"2015-04-21T19:26:17Z","pushed_at":"2015-06-01T12:04:09Z","git_url":"git://github.com/jluhrs/ocs.git","ssh_url":"git@github.com:jluhrs/ocs.git","clone_url":"https://github.com/jluhrs/ocs.git","svn_url":"https://github.com/jluhrs/ocs","homepage":null,"size":262392,"stargazers_count":0,"watchers_count":0,"language":"Java","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:develop","ref":"develop","sha":"df08564fc550b9f5da2e01ff896bf61324f20366","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":23963494,"name":"ocs","full_name":"gemini-hlsw/ocs","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/ocs","description":"Observatory Control Software","fork":false,"url":"https://api.github.com/repos/gemini-hlsw/ocs","forks_url":"https://api.github.com/repos/gemini-hlsw/ocs/forks","keys_url":"https://api.github.com/repos/gemini-hlsw/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gemini-hlsw/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gemini-hlsw/ocs/teams","hooks_url":"https://api.github.com/repos/gemini-hlsw/ocs/hooks","issue_events_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/gemini-hlsw/ocs/events","assignees_url":"https://api.github.com/repos/gemini-hlsw/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/gemini-hlsw/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/tags","blobs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/gemini-hlsw/ocs/languages","stargazers_url":"https://api.github.com/repos/gemini-hlsw/ocs/stargazers","contributors_url":"https://api.github.com/repos/gemini-hlsw/ocs/contributors","subscribers_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscribers","subscription_url":"https://api.github.com/repos/gemini-hlsw/ocs/subscription","commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gemini-hlsw/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gemini-hlsw/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gemini-hlsw/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/gemini-hlsw/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gemini-hlsw/ocs/merges","archive_url":"https://api.github.com/repos/gemini-hlsw/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gemini-hlsw/ocs/downloads","issues_url":"https://api.github.com/repos/gemini-hlsw/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/gemini-hlsw/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/gemini-hlsw/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/gemini-hlsw/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gemini-hlsw/ocs/labels{/name}","releases_url":"https://api.github.com/repos/gemini-hlsw/ocs/releases{/id}","created_at":"2014-09-12T14:20:23Z","updated_at":"2015-05-08T19:43:56Z","pushed_at":"2015-06-01T12:04:10Z","git_url":"git://github.com/gemini-hlsw/ocs.git","ssh_url":"git@github.com:gemini-hlsw/ocs.git","clone_url":"https://github.com/gemini-hlsw/ocs.git","svn_url":"https://github.com/gemini-hlsw/ocs","homepage":"","size":272930,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":2,"forks":10,"open_issues":2,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344"},"html":{"href":"https://github.com/gemini-hlsw/ocs/pull/344"},"issue":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/344"},"comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/issues/344/comments"},"review_comments":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344/comments"},"review_comment":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/pulls/344/commits"},"statuses":{"href":"https://api.github.com/repos/gemini-hlsw/ocs/statuses/718c0d7405a1e37fd7c42b737ac5ff2a6f539914"}}}}