{"action":"created","comment":{"url":"https://api.github.com/repos/starkandwayne/shield/pulls/comments/67937366","id":67937366,"diff_hunk":"@@ -92,17 +92,25 @@ func (self ArchiveAPI) ServeHTTP(w http.ResponseWriter, req *http.Request) {\n \t\t\treturn\n \t\t}\n \n+\t\ttaskChan := make(chan string, 1)\n \t\t// tell the supervisor to schedule a task\n \t\tself.Tasks <- &db.Task{\n-\t\t\tOp:          db.RestoreOperation,\n-\t\t\tOwner:       params.Owner,\n-\t\t\tTargetUUID:  tid,\n-\t\t\tArchiveUUID: id,\n-\t\t\tRestoreKey:  archive.StoreKey,\n+\t\t\tOp:           db.RestoreOperation,\n+\t\t\tOwner:        params.Owner,\n+\t\t\tTargetUUID:   tid,\n+\t\t\tArchiveUUID:  id,\n+\t\t\tRestoreKey:   archive.StoreKey,\n+\t\t\tTaskUUIDChan: taskChan,\n \t\t}\n \n-\t\tw.WriteHeader(200)\n-\t\tJSONLiteral(w, fmt.Sprintf(`{\"ok\":\"scheduled\"}`))\n+\t\ttaskUUID := <-taskChan\n+\t\tif taskUUID == \"\" {\n+\t\t\tw.WriteHeader(500)\n+\t\t\tJSONLiteral(w, fmt.Sprintf(`{\"ok\":\"error\"}`))","path":"supervisor/archives_api.go","position":25,"original_position":25,"commit_id":"edda3357b28c25475f24c0b2ee85afffad5f403c","original_commit_id":"edda3357b28c25475f24c0b2ee85afffad5f403c","user":{"login":"thomasmmitchell","id":12000017,"avatar_url":"https://avatars.githubusercontent.com/u/12000017?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmmitchell","html_url":"https://github.com/thomasmmitchell","followers_url":"https://api.github.com/users/thomasmmitchell/followers","following_url":"https://api.github.com/users/thomasmmitchell/following{/other_user}","gists_url":"https://api.github.com/users/thomasmmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmmitchell/subscriptions","organizations_url":"https://api.github.com/users/thomasmmitchell/orgs","repos_url":"https://api.github.com/users/thomasmmitchell/repos","events_url":"https://api.github.com/users/thomasmmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmmitchell/received_events","type":"User","site_admin":false},"body":"Answered above.","created_at":"2016-06-21T19:38:56Z","updated_at":"2016-06-21T19:38:56Z","html_url":"https://github.com/starkandwayne/shield/pull/186#discussion_r67937366","pull_request_url":"https://api.github.com/repos/starkandwayne/shield/pulls/186","_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/comments/67937366"},"html":{"href":"https://github.com/starkandwayne/shield/pull/186#discussion_r67937366"},"pull_request":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/starkandwayne/shield/pulls/186","id":74609853,"html_url":"https://github.com/starkandwayne/shield/pull/186","diff_url":"https://github.com/starkandwayne/shield/pull/186.diff","patch_url":"https://github.com/starkandwayne/shield/pull/186.patch","issue_url":"https://api.github.com/repos/starkandwayne/shield/issues/186","number":186,"state":"open","locked":false,"title":"Adhoc task uuid","user":{"login":"thomasmmitchell","id":12000017,"avatar_url":"https://avatars.githubusercontent.com/u/12000017?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasmmitchell","html_url":"https://github.com/thomasmmitchell","followers_url":"https://api.github.com/users/thomasmmitchell/followers","following_url":"https://api.github.com/users/thomasmmitchell/following{/other_user}","gists_url":"https://api.github.com/users/thomasmmitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmmitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmmitchell/subscriptions","organizations_url":"https://api.github.com/users/thomasmmitchell/orgs","repos_url":"https://api.github.com/users/thomasmmitchell/repos","events_url":"https://api.github.com/users/thomasmmitchell/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmmitchell/received_events","type":"User","site_admin":false},"body":"The daemon now returns a task uuid for adhoc tasks (`run job` and `restore archive`).\r\nThe CLI will display these if the backend supports it.","created_at":"2016-06-21T13:19:06Z","updated_at":"2016-06-21T19:38:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bbcc9f6d04b15e30f41a8d9253f7ba8bc1114ef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/starkandwayne/shield/pulls/186/commits","review_comments_url":"https://api.github.com/repos/starkandwayne/shield/pulls/186/comments","review_comment_url":"https://api.github.com/repos/starkandwayne/shield/pulls/comments{/number}","comments_url":"https://api.github.com/repos/starkandwayne/shield/issues/186/comments","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/edda3357b28c25475f24c0b2ee85afffad5f403c","head":{"label":"starkandwayne:adhoc-task-uuid","ref":"adhoc-task-uuid","sha":"edda3357b28c25475f24c0b2ee85afffad5f403c","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":44686588,"name":"shield","full_name":"starkandwayne/shield","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/shield","description":"A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems","fork":false,"url":"https://api.github.com/repos/starkandwayne/shield","forks_url":"https://api.github.com/repos/starkandwayne/shield/forks","keys_url":"https://api.github.com/repos/starkandwayne/shield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/shield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/shield/teams","hooks_url":"https://api.github.com/repos/starkandwayne/shield/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/shield/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/shield/events","assignees_url":"https://api.github.com/repos/starkandwayne/shield/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/shield/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/shield/tags","blobs_url":"https://api.github.com/repos/starkandwayne/shield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/shield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/shield/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/shield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/shield/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/shield/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/shield/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/shield/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/shield/subscription","commits_url":"https://api.github.com/repos/starkandwayne/shield/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/shield/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/shield/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/shield/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/shield/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/shield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/shield/merges","archive_url":"https://api.github.com/repos/starkandwayne/shield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/shield/downloads","issues_url":"https://api.github.com/repos/starkandwayne/shield/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/shield/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/shield/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/shield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/shield/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/shield/releases{/id}","deployments_url":"https://api.github.com/repos/starkandwayne/shield/deployments","created_at":"2015-10-21T15:39:36Z","updated_at":"2016-06-20T19:38:50Z","pushed_at":"2016-06-21T18:13:59Z","git_url":"git://github.com/starkandwayne/shield.git","ssh_url":"git@github.com:starkandwayne/shield.git","clone_url":"https://github.com/starkandwayne/shield.git","svn_url":"https://github.com/starkandwayne/shield","homepage":"","size":8466,"stargazers_count":39,"watchers_count":39,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":21,"forks":5,"open_issues":21,"watchers":39,"default_branch":"master"}},"base":{"label":"starkandwayne:master","ref":"master","sha":"60a74e9d6a5ca0dc6c107adbda7ee1c201c317ef","user":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"repo":{"id":44686588,"name":"shield","full_name":"starkandwayne/shield","owner":{"login":"starkandwayne","id":2721362,"avatar_url":"https://avatars.githubusercontent.com/u/2721362?v=3","gravatar_id":"","url":"https://api.github.com/users/starkandwayne","html_url":"https://github.com/starkandwayne","followers_url":"https://api.github.com/users/starkandwayne/followers","following_url":"https://api.github.com/users/starkandwayne/following{/other_user}","gists_url":"https://api.github.com/users/starkandwayne/gists{/gist_id}","starred_url":"https://api.github.com/users/starkandwayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starkandwayne/subscriptions","organizations_url":"https://api.github.com/users/starkandwayne/orgs","repos_url":"https://api.github.com/users/starkandwayne/repos","events_url":"https://api.github.com/users/starkandwayne/events{/privacy}","received_events_url":"https://api.github.com/users/starkandwayne/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/starkandwayne/shield","description":"A standalone system that can perform backup and restore functions for a wide variety of pluggable data systems","fork":false,"url":"https://api.github.com/repos/starkandwayne/shield","forks_url":"https://api.github.com/repos/starkandwayne/shield/forks","keys_url":"https://api.github.com/repos/starkandwayne/shield/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starkandwayne/shield/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starkandwayne/shield/teams","hooks_url":"https://api.github.com/repos/starkandwayne/shield/hooks","issue_events_url":"https://api.github.com/repos/starkandwayne/shield/issues/events{/number}","events_url":"https://api.github.com/repos/starkandwayne/shield/events","assignees_url":"https://api.github.com/repos/starkandwayne/shield/assignees{/user}","branches_url":"https://api.github.com/repos/starkandwayne/shield/branches{/branch}","tags_url":"https://api.github.com/repos/starkandwayne/shield/tags","blobs_url":"https://api.github.com/repos/starkandwayne/shield/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starkandwayne/shield/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starkandwayne/shield/git/refs{/sha}","trees_url":"https://api.github.com/repos/starkandwayne/shield/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starkandwayne/shield/statuses/{sha}","languages_url":"https://api.github.com/repos/starkandwayne/shield/languages","stargazers_url":"https://api.github.com/repos/starkandwayne/shield/stargazers","contributors_url":"https://api.github.com/repos/starkandwayne/shield/contributors","subscribers_url":"https://api.github.com/repos/starkandwayne/shield/subscribers","subscription_url":"https://api.github.com/repos/starkandwayne/shield/subscription","commits_url":"https://api.github.com/repos/starkandwayne/shield/commits{/sha}","git_commits_url":"https://api.github.com/repos/starkandwayne/shield/git/commits{/sha}","comments_url":"https://api.github.com/repos/starkandwayne/shield/comments{/number}","issue_comment_url":"https://api.github.com/repos/starkandwayne/shield/issues/comments{/number}","contents_url":"https://api.github.com/repos/starkandwayne/shield/contents/{+path}","compare_url":"https://api.github.com/repos/starkandwayne/shield/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starkandwayne/shield/merges","archive_url":"https://api.github.com/repos/starkandwayne/shield/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starkandwayne/shield/downloads","issues_url":"https://api.github.com/repos/starkandwayne/shield/issues{/number}","pulls_url":"https://api.github.com/repos/starkandwayne/shield/pulls{/number}","milestones_url":"https://api.github.com/repos/starkandwayne/shield/milestones{/number}","notifications_url":"https://api.github.com/repos/starkandwayne/shield/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starkandwayne/shield/labels{/name}","releases_url":"https://api.github.com/repos/starkandwayne/shield/releases{/id}","deployments_url":"https://api.github.com/repos/starkandwayne/shield/deployments","created_at":"2015-10-21T15:39:36Z","updated_at":"2016-06-20T19:38:50Z","pushed_at":"2016-06-21T18:13:59Z","git_url":"git://github.com/starkandwayne/shield.git","ssh_url":"git@github.com:starkandwayne/shield.git","clone_url":"https://github.com/starkandwayne/shield.git","svn_url":"https://github.com/starkandwayne/shield","homepage":"","size":8466,"stargazers_count":39,"watchers_count":39,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":21,"forks":5,"open_issues":21,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/186"},"html":{"href":"https://github.com/starkandwayne/shield/pull/186"},"issue":{"href":"https://api.github.com/repos/starkandwayne/shield/issues/186"},"comments":{"href":"https://api.github.com/repos/starkandwayne/shield/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/starkandwayne/shield/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/starkandwayne/shield/statuses/edda3357b28c25475f24c0b2ee85afffad5f403c"}}}}
{"actor":{"display_login":"thomasmmitchell"}}