{"action":"created","comment":{"url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/comments/138436247","pull_request_review_id":62231279,"id":138436247,"diff_hunk":"@@ -2399,6 +2400,7 @@ api.declare({\n       workerId,\n       recentTasks: Entity.types.SlugIdArray.create(),\n       expires: expires || taskcluster.fromNow('1 day'),\n+      disabled: false,\n       firstClaim: new Date(),\n     });","path":"src/api.js","position":23,"original_position":23,"commit_id":"38a6606dc8d11690ae3b692f5dd01b840324492d","original_commit_id":"38a6606dc8d11690ae3b692f5dd01b840324492d","user":{"login":"jonasfj","id":149732,"avatar_url":"https://avatars2.githubusercontent.com/u/149732?v=4","gravatar_id":"","url":"https://api.github.com/users/jonasfj","html_url":"https://github.com/jonasfj","followers_url":"https://api.github.com/users/jonasfj/followers","following_url":"https://api.github.com/users/jonasfj/following{/other_user}","gists_url":"https://api.github.com/users/jonasfj/gists{/gist_id}","starred_url":"https://api.github.com/users/jonasfj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonasfj/subscriptions","organizations_url":"https://api.github.com/users/jonasfj/orgs","repos_url":"https://api.github.com/users/jonasfj/repos","events_url":"https://api.github.com/users/jonasfj/events{/privacy}","received_events_url":"https://api.github.com/users/jonasfj/received_events","type":"User","site_admin":false},"body":"You'll need to catch the case there the entity exists... in case you are racing...\r\n\r\nNote: I might be tempting to make a `this.Worker.upsert` method in `data.js` that does the right thing in these cases... Assuming it can be easily defined what that is for the `Worker` table..","created_at":"2017-09-12T18:54:52Z","updated_at":"2017-09-12T18:54:52Z","html_url":"https://github.com/taskcluster/taskcluster-queue/pull/198#discussion_r138436247","pull_request_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/comments/138436247"},"html":{"href":"https://github.com/taskcluster/taskcluster-queue/pull/198#discussion_r138436247"},"pull_request":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198"}}},"pull_request":{"url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198","id":140589604,"html_url":"https://github.com/taskcluster/taskcluster-queue/pull/198","diff_url":"https://github.com/taskcluster/taskcluster-queue/pull/198.diff","patch_url":"https://github.com/taskcluster/taskcluster-queue/pull/198.patch","issue_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/198","number":198,"state":"open","locked":false,"title":"Bug 1399123 - Enable/Disable workers","user":{"login":"helfi92","id":3766511,"avatar_url":"https://avatars0.githubusercontent.com/u/3766511?v=4","gravatar_id":"","url":"https://api.github.com/users/helfi92","html_url":"https://github.com/helfi92","followers_url":"https://api.github.com/users/helfi92/followers","following_url":"https://api.github.com/users/helfi92/following{/other_user}","gists_url":"https://api.github.com/users/helfi92/gists{/gist_id}","starred_url":"https://api.github.com/users/helfi92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfi92/subscriptions","organizations_url":"https://api.github.com/users/helfi92/orgs","repos_url":"https://api.github.com/users/helfi92/repos","events_url":"https://api.github.com/users/helfi92/events{/privacy}","received_events_url":"https://api.github.com/users/helfi92/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-12T14:07:57Z","updated_at":"2017-09-12T18:54:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66fe95b737be52bc5b5e4b1f6644d53db04c55cb","assignee":{"login":"helfi92","id":3766511,"avatar_url":"https://avatars0.githubusercontent.com/u/3766511?v=4","gravatar_id":"","url":"https://api.github.com/users/helfi92","html_url":"https://github.com/helfi92","followers_url":"https://api.github.com/users/helfi92/followers","following_url":"https://api.github.com/users/helfi92/following{/other_user}","gists_url":"https://api.github.com/users/helfi92/gists{/gist_id}","starred_url":"https://api.github.com/users/helfi92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfi92/subscriptions","organizations_url":"https://api.github.com/users/helfi92/orgs","repos_url":"https://api.github.com/users/helfi92/repos","events_url":"https://api.github.com/users/helfi92/events{/privacy}","received_events_url":"https://api.github.com/users/helfi92/received_events","type":"User","site_admin":false},"assignees":[{"login":"helfi92","id":3766511,"avatar_url":"https://avatars0.githubusercontent.com/u/3766511?v=4","gravatar_id":"","url":"https://api.github.com/users/helfi92","html_url":"https://github.com/helfi92","followers_url":"https://api.github.com/users/helfi92/followers","following_url":"https://api.github.com/users/helfi92/following{/other_user}","gists_url":"https://api.github.com/users/helfi92/gists{/gist_id}","starred_url":"https://api.github.com/users/helfi92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfi92/subscriptions","organizations_url":"https://api.github.com/users/helfi92/orgs","repos_url":"https://api.github.com/users/helfi92/repos","events_url":"https://api.github.com/users/helfi92/events{/privacy}","received_events_url":"https://api.github.com/users/helfi92/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"djmitche","id":28673,"avatar_url":"https://avatars3.githubusercontent.com/u/28673?v=4","gravatar_id":"","url":"https://api.github.com/users/djmitche","html_url":"https://github.com/djmitche","followers_url":"https://api.github.com/users/djmitche/followers","following_url":"https://api.github.com/users/djmitche/following{/other_user}","gists_url":"https://api.github.com/users/djmitche/gists{/gist_id}","starred_url":"https://api.github.com/users/djmitche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djmitche/subscriptions","organizations_url":"https://api.github.com/users/djmitche/orgs","repos_url":"https://api.github.com/users/djmitche/repos","events_url":"https://api.github.com/users/djmitche/events{/privacy}","received_events_url":"https://api.github.com/users/djmitche/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198/commits","review_comments_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198/comments","review_comment_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/198/comments","statuses_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/statuses/38a6606dc8d11690ae3b692f5dd01b840324492d","head":{"label":"helfi92:disable-enable-workers","ref":"disable-enable-workers","sha":"38a6606dc8d11690ae3b692f5dd01b840324492d","user":{"login":"helfi92","id":3766511,"avatar_url":"https://avatars0.githubusercontent.com/u/3766511?v=4","gravatar_id":"","url":"https://api.github.com/users/helfi92","html_url":"https://github.com/helfi92","followers_url":"https://api.github.com/users/helfi92/followers","following_url":"https://api.github.com/users/helfi92/following{/other_user}","gists_url":"https://api.github.com/users/helfi92/gists{/gist_id}","starred_url":"https://api.github.com/users/helfi92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfi92/subscriptions","organizations_url":"https://api.github.com/users/helfi92/orgs","repos_url":"https://api.github.com/users/helfi92/repos","events_url":"https://api.github.com/users/helfi92/events{/privacy}","received_events_url":"https://api.github.com/users/helfi92/received_events","type":"User","site_admin":false},"repo":{"id":98897007,"name":"taskcluster-queue","full_name":"helfi92/taskcluster-queue","owner":{"login":"helfi92","id":3766511,"avatar_url":"https://avatars0.githubusercontent.com/u/3766511?v=4","gravatar_id":"","url":"https://api.github.com/users/helfi92","html_url":"https://github.com/helfi92","followers_url":"https://api.github.com/users/helfi92/followers","following_url":"https://api.github.com/users/helfi92/following{/other_user}","gists_url":"https://api.github.com/users/helfi92/gists{/gist_id}","starred_url":"https://api.github.com/users/helfi92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helfi92/subscriptions","organizations_url":"https://api.github.com/users/helfi92/orgs","repos_url":"https://api.github.com/users/helfi92/repos","events_url":"https://api.github.com/users/helfi92/events{/privacy}","received_events_url":"https://api.github.com/users/helfi92/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/helfi92/taskcluster-queue","description":"The central queue coordinating execution of tasks in the taskcluster setup.","fork":true,"url":"https://api.github.com/repos/helfi92/taskcluster-queue","forks_url":"https://api.github.com/repos/helfi92/taskcluster-queue/forks","keys_url":"https://api.github.com/repos/helfi92/taskcluster-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/helfi92/taskcluster-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/helfi92/taskcluster-queue/teams","hooks_url":"https://api.github.com/repos/helfi92/taskcluster-queue/hooks","issue_events_url":"https://api.github.com/repos/helfi92/taskcluster-queue/issues/events{/number}","events_url":"https://api.github.com/repos/helfi92/taskcluster-queue/events","assignees_url":"https://api.github.com/repos/helfi92/taskcluster-queue/assignees{/user}","branches_url":"https://api.github.com/repos/helfi92/taskcluster-queue/branches{/branch}","tags_url":"https://api.github.com/repos/helfi92/taskcluster-queue/tags","blobs_url":"https://api.github.com/repos/helfi92/taskcluster-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/helfi92/taskcluster-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/helfi92/taskcluster-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/helfi92/taskcluster-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/helfi92/taskcluster-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/helfi92/taskcluster-queue/languages","stargazers_url":"https://api.github.com/repos/helfi92/taskcluster-queue/stargazers","contributors_url":"https://api.github.com/repos/helfi92/taskcluster-queue/contributors","subscribers_url":"https://api.github.com/repos/helfi92/taskcluster-queue/subscribers","subscription_url":"https://api.github.com/repos/helfi92/taskcluster-queue/subscription","commits_url":"https://api.github.com/repos/helfi92/taskcluster-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/helfi92/taskcluster-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/helfi92/taskcluster-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/helfi92/taskcluster-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/helfi92/taskcluster-queue/contents/{+path}","compare_url":"https://api.github.com/repos/helfi92/taskcluster-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/helfi92/taskcluster-queue/merges","archive_url":"https://api.github.com/repos/helfi92/taskcluster-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/helfi92/taskcluster-queue/downloads","issues_url":"https://api.github.com/repos/helfi92/taskcluster-queue/issues{/number}","pulls_url":"https://api.github.com/repos/helfi92/taskcluster-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/helfi92/taskcluster-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/helfi92/taskcluster-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/helfi92/taskcluster-queue/labels{/name}","releases_url":"https://api.github.com/repos/helfi92/taskcluster-queue/releases{/id}","deployments_url":"https://api.github.com/repos/helfi92/taskcluster-queue/deployments","created_at":"2017-07-31T14:18:28Z","updated_at":"2017-07-31T14:18:30Z","pushed_at":"2017-09-12T14:07:05Z","git_url":"git://github.com/helfi92/taskcluster-queue.git","ssh_url":"git@github.com:helfi92/taskcluster-queue.git","clone_url":"https://github.com/helfi92/taskcluster-queue.git","svn_url":"https://github.com/helfi92/taskcluster-queue","homepage":"","size":16942,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"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":"taskcluster:master","ref":"master","sha":"9b36857aa8f8f27515382b48e638e9754ebf5993","user":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"repo":{"id":16423616,"name":"taskcluster-queue","full_name":"taskcluster/taskcluster-queue","owner":{"login":"taskcluster","id":6257436,"avatar_url":"https://avatars2.githubusercontent.com/u/6257436?v=4","gravatar_id":"","url":"https://api.github.com/users/taskcluster","html_url":"https://github.com/taskcluster","followers_url":"https://api.github.com/users/taskcluster/followers","following_url":"https://api.github.com/users/taskcluster/following{/other_user}","gists_url":"https://api.github.com/users/taskcluster/gists{/gist_id}","starred_url":"https://api.github.com/users/taskcluster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taskcluster/subscriptions","organizations_url":"https://api.github.com/users/taskcluster/orgs","repos_url":"https://api.github.com/users/taskcluster/repos","events_url":"https://api.github.com/users/taskcluster/events{/privacy}","received_events_url":"https://api.github.com/users/taskcluster/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taskcluster/taskcluster-queue","description":"The central queue coordinating execution of tasks in the taskcluster setup.","fork":false,"url":"https://api.github.com/repos/taskcluster/taskcluster-queue","forks_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/forks","keys_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/teams","hooks_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/hooks","issue_events_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/events{/number}","events_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/events","assignees_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/assignees{/user}","branches_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/branches{/branch}","tags_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/tags","blobs_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/git/refs{/sha}","trees_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/statuses/{sha}","languages_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/languages","stargazers_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/stargazers","contributors_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/contributors","subscribers_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/subscribers","subscription_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/subscription","commits_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/commits{/sha}","git_commits_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/git/commits{/sha}","comments_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/comments{/number}","issue_comment_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/comments{/number}","contents_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/contents/{+path}","compare_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/merges","archive_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/downloads","issues_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues{/number}","pulls_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls{/number}","milestones_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/milestones{/number}","notifications_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/labels{/name}","releases_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/releases{/id}","deployments_url":"https://api.github.com/repos/taskcluster/taskcluster-queue/deployments","created_at":"2014-01-31T23:12:31Z","updated_at":"2017-07-28T07:05:36Z","pushed_at":"2017-09-12T14:07:58Z","git_url":"git://github.com/taskcluster/taskcluster-queue.git","ssh_url":"git@github.com:taskcluster/taskcluster-queue.git","clone_url":"https://github.com/taskcluster/taskcluster-queue.git","svn_url":"https://github.com/taskcluster/taskcluster-queue","homepage":"","size":17193,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":4,"forks":17,"open_issues":4,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198"},"html":{"href":"https://github.com/taskcluster/taskcluster-queue/pull/198"},"issue":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/198"},"comments":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/issues/198/comments"},"review_comments":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198/comments"},"review_comment":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/pulls/198/commits"},"statuses":{"href":"https://api.github.com/repos/taskcluster/taskcluster-queue/statuses/38a6606dc8d11690ae3b692f5dd01b840324492d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jonasfj"}}