{"action":"created","comment":{"url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/comments/40133341","id":40133341,"diff_hunk":"@@ -0,0 +1,37 @@\n+import os\n+import yaml\n+import logging\n+import tempfile\n+from binstar_client import errors\n+from argparse import Namespace\n+log = logging.getLogger(\"binstar.build\")\n+\n+def register_worker(bs, args):\n+    '''\n+    Register the worker with binstar","path":"binstar_build_client/worker/register.py","position":11,"original_position":11,"commit_id":"ebde47869e0684661947416e346a26d8adfa581b","original_commit_id":"ebde47869e0684661947416e346a26d8adfa581b","user":{"login":"goanpeca","id":3627835,"avatar_url":"https://avatars.githubusercontent.com/u/3627835?v=3","gravatar_id":"","url":"https://api.github.com/users/goanpeca","html_url":"https://github.com/goanpeca","followers_url":"https://api.github.com/users/goanpeca/followers","following_url":"https://api.github.com/users/goanpeca/following{/other_user}","gists_url":"https://api.github.com/users/goanpeca/gists{/gist_id}","starred_url":"https://api.github.com/users/goanpeca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goanpeca/subscriptions","organizations_url":"https://api.github.com/users/goanpeca/orgs","repos_url":"https://api.github.com/users/goanpeca/repos","events_url":"https://api.github.com/users/goanpeca/events{/privacy}","received_events_url":"https://api.github.com/users/goanpeca/received_events","type":"User","site_admin":false},"body":"binstar?","created_at":"2015-09-22T19:35:50Z","updated_at":"2015-09-22T19:35:50Z","html_url":"https://github.com/Anaconda-Server/anaconda-build/pull/89#discussion_r40133341","pull_request_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89","_links":{"self":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/comments/40133341"},"html":{"href":"https://github.com/Anaconda-Server/anaconda-build/pull/89#discussion_r40133341"},"pull_request":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89"}}},"pull_request":{"url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89","id":45702865,"html_url":"https://github.com/Anaconda-Server/anaconda-build/pull/89","diff_url":"https://github.com/Anaconda-Server/anaconda-build/pull/89.diff","patch_url":"https://github.com/Anaconda-Server/anaconda-build/pull/89.patch","issue_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/89","number":89,"state":"open","locked":false,"title":"Feature/register workers","user":{"login":"PeterDSteinberg","id":1445602,"avatar_url":"https://avatars.githubusercontent.com/u/1445602?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterDSteinberg","html_url":"https://github.com/PeterDSteinberg","followers_url":"https://api.github.com/users/PeterDSteinberg/followers","following_url":"https://api.github.com/users/PeterDSteinberg/following{/other_user}","gists_url":"https://api.github.com/users/PeterDSteinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterDSteinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterDSteinberg/subscriptions","organizations_url":"https://api.github.com/users/PeterDSteinberg/orgs","repos_url":"https://api.github.com/users/PeterDSteinberg/repos","events_url":"https://api.github.com/users/PeterDSteinberg/events{/privacy}","received_events_url":"https://api.github.com/users/PeterDSteinberg/received_events","type":"User","site_admin":false},"body":"This PR breaks out what was <code>worker_context</code> into separate register, worker, and deregister steps.  This raises the need for documentation changes.  \r\n\r\nExample:\r\n```\r\nanaconda build register psteinberg/abc --hostname localhost --cwd . -o worker.yaml\r\n```\r\nAny argument we are used to passing to ```anaconda build worker``` can now be passed to ```anaconda build register``` and that configuration, along with the generated worker_id, will be found in the output file named by ```-o``` or ```--output```. Then the worker is actually run by passing the yaml file to it:\r\n\r\n```\r\nanaconda build worker worker.yaml\r\n```\r\nFinally deregister that worker by giving the worker.yaml or the username, queue and worker_id. An example\r\n```\r\nanaconda build deregister --config worker.yaml\r\n```\r\n\r\nMock tests of register/deregister were added.","created_at":"2015-09-22T18:59:48Z","updated_at":"2015-09-22T19:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58e1b49e4a73620a2a86a578f727976851043c84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89/commits","review_comments_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89/comments","review_comment_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/89/comments","statuses_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/statuses/ebde47869e0684661947416e346a26d8adfa581b","head":{"label":"Anaconda-Server:feature/register_workers","ref":"feature/register_workers","sha":"ebde47869e0684661947416e346a26d8adfa581b","user":{"login":"Anaconda-Server","id":3571983,"avatar_url":"https://avatars.githubusercontent.com/u/3571983?v=3","gravatar_id":"","url":"https://api.github.com/users/Anaconda-Server","html_url":"https://github.com/Anaconda-Server","followers_url":"https://api.github.com/users/Anaconda-Server/followers","following_url":"https://api.github.com/users/Anaconda-Server/following{/other_user}","gists_url":"https://api.github.com/users/Anaconda-Server/gists{/gist_id}","starred_url":"https://api.github.com/users/Anaconda-Server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anaconda-Server/subscriptions","organizations_url":"https://api.github.com/users/Anaconda-Server/orgs","repos_url":"https://api.github.com/users/Anaconda-Server/repos","events_url":"https://api.github.com/users/Anaconda-Server/events{/privacy}","received_events_url":"https://api.github.com/users/Anaconda-Server/received_events","type":"Organization","site_admin":false},"repo":{"id":19550310,"name":"anaconda-build","full_name":"Anaconda-Server/anaconda-build","owner":{"login":"Anaconda-Server","id":3571983,"avatar_url":"https://avatars.githubusercontent.com/u/3571983?v=3","gravatar_id":"","url":"https://api.github.com/users/Anaconda-Server","html_url":"https://github.com/Anaconda-Server","followers_url":"https://api.github.com/users/Anaconda-Server/followers","following_url":"https://api.github.com/users/Anaconda-Server/following{/other_user}","gists_url":"https://api.github.com/users/Anaconda-Server/gists{/gist_id}","starred_url":"https://api.github.com/users/Anaconda-Server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anaconda-Server/subscriptions","organizations_url":"https://api.github.com/users/Anaconda-Server/orgs","repos_url":"https://api.github.com/users/Anaconda-Server/repos","events_url":"https://api.github.com/users/Anaconda-Server/events{/privacy}","received_events_url":"https://api.github.com/users/Anaconda-Server/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Anaconda-Server/anaconda-build","description":"Conda server build","fork":false,"url":"https://api.github.com/repos/Anaconda-Server/anaconda-build","forks_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/forks","keys_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/teams","hooks_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/hooks","issue_events_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/events{/number}","events_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/events","assignees_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/assignees{/user}","branches_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/branches{/branch}","tags_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/tags","blobs_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/statuses/{sha}","languages_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/languages","stargazers_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/stargazers","contributors_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/contributors","subscribers_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/subscribers","subscription_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/subscription","commits_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/contents/{+path}","compare_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/merges","archive_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/downloads","issues_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues{/number}","pulls_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls{/number}","milestones_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/milestones{/number}","notifications_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/labels{/name}","releases_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/releases{/id}","created_at":"2014-05-07T21:04:29Z","updated_at":"2015-09-10T20:13:19Z","pushed_at":"2015-09-22T19:14:16Z","git_url":"git://github.com/Anaconda-Server/anaconda-build.git","ssh_url":"git@github.com:Anaconda-Server/anaconda-build.git","clone_url":"https://github.com/Anaconda-Server/anaconda-build.git","svn_url":"https://github.com/Anaconda-Server/anaconda-build","homepage":"","size":1418,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":47,"forks":9,"open_issues":47,"watchers":3,"default_branch":"develop"}},"base":{"label":"Anaconda-Server:develop","ref":"develop","sha":"92e55c70c5c111001ce26329ca2aa9d9bd66ea0d","user":{"login":"Anaconda-Server","id":3571983,"avatar_url":"https://avatars.githubusercontent.com/u/3571983?v=3","gravatar_id":"","url":"https://api.github.com/users/Anaconda-Server","html_url":"https://github.com/Anaconda-Server","followers_url":"https://api.github.com/users/Anaconda-Server/followers","following_url":"https://api.github.com/users/Anaconda-Server/following{/other_user}","gists_url":"https://api.github.com/users/Anaconda-Server/gists{/gist_id}","starred_url":"https://api.github.com/users/Anaconda-Server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anaconda-Server/subscriptions","organizations_url":"https://api.github.com/users/Anaconda-Server/orgs","repos_url":"https://api.github.com/users/Anaconda-Server/repos","events_url":"https://api.github.com/users/Anaconda-Server/events{/privacy}","received_events_url":"https://api.github.com/users/Anaconda-Server/received_events","type":"Organization","site_admin":false},"repo":{"id":19550310,"name":"anaconda-build","full_name":"Anaconda-Server/anaconda-build","owner":{"login":"Anaconda-Server","id":3571983,"avatar_url":"https://avatars.githubusercontent.com/u/3571983?v=3","gravatar_id":"","url":"https://api.github.com/users/Anaconda-Server","html_url":"https://github.com/Anaconda-Server","followers_url":"https://api.github.com/users/Anaconda-Server/followers","following_url":"https://api.github.com/users/Anaconda-Server/following{/other_user}","gists_url":"https://api.github.com/users/Anaconda-Server/gists{/gist_id}","starred_url":"https://api.github.com/users/Anaconda-Server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anaconda-Server/subscriptions","organizations_url":"https://api.github.com/users/Anaconda-Server/orgs","repos_url":"https://api.github.com/users/Anaconda-Server/repos","events_url":"https://api.github.com/users/Anaconda-Server/events{/privacy}","received_events_url":"https://api.github.com/users/Anaconda-Server/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Anaconda-Server/anaconda-build","description":"Conda server build","fork":false,"url":"https://api.github.com/repos/Anaconda-Server/anaconda-build","forks_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/forks","keys_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/teams","hooks_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/hooks","issue_events_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/events{/number}","events_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/events","assignees_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/assignees{/user}","branches_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/branches{/branch}","tags_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/tags","blobs_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/statuses/{sha}","languages_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/languages","stargazers_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/stargazers","contributors_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/contributors","subscribers_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/subscribers","subscription_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/subscription","commits_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/contents/{+path}","compare_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/merges","archive_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/downloads","issues_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues{/number}","pulls_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls{/number}","milestones_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/milestones{/number}","notifications_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/labels{/name}","releases_url":"https://api.github.com/repos/Anaconda-Server/anaconda-build/releases{/id}","created_at":"2014-05-07T21:04:29Z","updated_at":"2015-09-10T20:13:19Z","pushed_at":"2015-09-22T19:14:16Z","git_url":"git://github.com/Anaconda-Server/anaconda-build.git","ssh_url":"git@github.com:Anaconda-Server/anaconda-build.git","clone_url":"https://github.com/Anaconda-Server/anaconda-build.git","svn_url":"https://github.com/Anaconda-Server/anaconda-build","homepage":"","size":1418,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":47,"forks":9,"open_issues":47,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89"},"html":{"href":"https://github.com/Anaconda-Server/anaconda-build/pull/89"},"issue":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/89"},"comments":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/Anaconda-Server/anaconda-build/statuses/ebde47869e0684661947416e346a26d8adfa581b"}}}}