{"action":"created","comment":{"url":"https://api.github.com/repos/elifesciences/builder/pulls/comments/80889815","pull_request_review_id":1910188,"id":80889815,"diff_hunk":"@@ -202,16 +202,10 @@ def cmd(stackname, command=None, username=DEPLOY_USER):\n     print \"Connecting to: %s\" % stackname\n     stack_all_ec2_nodes(\n         stackname,\n-        cmd_parallel_subtask,\n+        (parallel(lambda command: run(command)), {'command': command}),","path":"src/cfn.py","position":null,"original_position":5,"commit_id":"6bd0f99c1be7d5260110e567f9ed4b51e2c26cbd","original_commit_id":"1b48755f9718c5596541f61f8fd517da6e1d249c","user":{"login":"giorgiosironi","id":160299,"avatar_url":"https://avatars.githubusercontent.com/u/160299?v=3","gravatar_id":"","url":"https://api.github.com/users/giorgiosironi","html_url":"https://github.com/giorgiosironi","followers_url":"https://api.github.com/users/giorgiosironi/followers","following_url":"https://api.github.com/users/giorgiosironi/following{/other_user}","gists_url":"https://api.github.com/users/giorgiosironi/gists{/gist_id}","starred_url":"https://api.github.com/users/giorgiosironi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorgiosironi/subscriptions","organizations_url":"https://api.github.com/users/giorgiosironi/orgs","repos_url":"https://api.github.com/users/giorgiosironi/repos","events_url":"https://api.github.com/users/giorgiosironi/events{/privacy}","received_events_url":"https://api.github.com/users/giorgiosironi/received_events","type":"User","site_admin":false},"body":"that's what I was looking for, thanks: a more idiomatic way to do this in Fabric that didn't require all the bureaucracy of separate tasks","created_at":"2016-09-28T10:53:06Z","updated_at":"2016-09-28T10:53:06Z","html_url":"https://github.com/elifesciences/builder/pull/55#discussion_r80889815","pull_request_url":"https://api.github.com/repos/elifesciences/builder/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/comments/80889815"},"html":{"href":"https://github.com/elifesciences/builder/pull/55#discussion_r80889815"},"pull_request":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/elifesciences/builder/pulls/55","id":86889970,"html_url":"https://github.com/elifesciences/builder/pull/55","diff_url":"https://github.com/elifesciences/builder/pull/55.diff","patch_url":"https://github.com/elifesciences/builder/pull/55.patch","issue_url":"https://api.github.com/repos/elifesciences/builder/issues/55","number":55,"state":"open","locked":false,"title":"Demonstrating support for parallelization of commands in Fabric/Builder","user":{"login":"giorgiosironi","id":160299,"avatar_url":"https://avatars.githubusercontent.com/u/160299?v=3","gravatar_id":"","url":"https://api.github.com/users/giorgiosironi","html_url":"https://github.com/giorgiosironi","followers_url":"https://api.github.com/users/giorgiosironi/followers","following_url":"https://api.github.com/users/giorgiosironi/following{/other_user}","gists_url":"https://api.github.com/users/giorgiosironi/gists{/gist_id}","starred_url":"https://api.github.com/users/giorgiosironi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorgiosironi/subscriptions","organizations_url":"https://api.github.com/users/giorgiosironi/orgs","repos_url":"https://api.github.com/users/giorgiosironi/repos","events_url":"https://api.github.com/users/giorgiosironi/events{/privacy}","received_events_url":"https://api.github.com/users/giorgiosironi/received_events","type":"User","site_admin":false},"body":"Two `sleep 20` tasks execute in parallel, taking 28s instead of > 40s.\n```\n]$ time bldr \"cmd:journal--end2end,sleep 20\"1474967367.030414 - WARNING - MainProcess - buildercore.decorators - TODO: embarassing code. some of these constants should be pulled form project config or given better names.\n1474967367.033715 - INFO - MainProcess - buildercore.config - using settings path u'/home/giorgio/code/builder/settings.yml'\nConnecting to: journal--end2end\nconnecting to a journal instance in region us-east-1\nconnecting to a journal instance in region us-east-1\n1474967373.690452 - INFO - MainProcess - buildercore.core - Executing <function cmd_parallel_subtask at 0x7ff8a1282410> on all ec2 nodes ([u'54.227.6.72', u'52.91.22.168'])\n[54.227.6.72] Executing task 'cmd_parallel_subtask'\n[52.91.22.168] Executing task 'cmd_parallel_subtask'\n[52.91.22.168] run: sleep 20\n[54.227.6.72] run: sleep 20\n1474967374.007130 - INFO - 52.91.22.168 - paramiko.transport - Connected (version 2.0, client OpenSSH_6.6.1p1)\n1474967374.007157 - INFO - 54.227.6.72 - paramiko.transport - Connected (version 2.0, client OpenSSH_6.6.1p1)\n1474967374.765575 - INFO - 54.227.6.72 - paramiko.transport - Authentication (publickey) successful!\n1474967374.868573 - INFO - 52.91.22.168 - paramiko.transport - Authentication (publickey) successful!\n\nDone.\n\nreal    0m28.862s\nuser    0m5.488s\nsys     0m0.616s\n```\nThe output is printed line-wise, without mixing up hosts.","created_at":"2016-09-27T09:12:15Z","updated_at":"2016-09-28T10:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c202f1f66dcb9b2717ef5a7185c7e0d3eeb450c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elifesciences/builder/pulls/55/commits","review_comments_url":"https://api.github.com/repos/elifesciences/builder/pulls/55/comments","review_comment_url":"https://api.github.com/repos/elifesciences/builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elifesciences/builder/issues/55/comments","statuses_url":"https://api.github.com/repos/elifesciences/builder/statuses/6bd0f99c1be7d5260110e567f9ed4b51e2c26cbd","head":{"label":"elifesciences:parallel_cmd","ref":"parallel_cmd","sha":"6bd0f99c1be7d5260110e567f9ed4b51e2c26cbd","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars.githubusercontent.com/u/1777367?v=3","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":56778863,"name":"builder","full_name":"elifesciences/builder","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars.githubusercontent.com/u/1777367?v=3","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/builder","description":"","fork":false,"url":"https://api.github.com/repos/elifesciences/builder","forks_url":"https://api.github.com/repos/elifesciences/builder/forks","keys_url":"https://api.github.com/repos/elifesciences/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/builder/teams","hooks_url":"https://api.github.com/repos/elifesciences/builder/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/builder/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/builder/events","assignees_url":"https://api.github.com/repos/elifesciences/builder/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/builder/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/builder/tags","blobs_url":"https://api.github.com/repos/elifesciences/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/builder/languages","stargazers_url":"https://api.github.com/repos/elifesciences/builder/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/builder/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/builder/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/builder/subscription","commits_url":"https://api.github.com/repos/elifesciences/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/builder/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/builder/merges","archive_url":"https://api.github.com/repos/elifesciences/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/builder/downloads","issues_url":"https://api.github.com/repos/elifesciences/builder/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/builder/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/builder/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/builder/deployments","created_at":"2016-04-21T14:08:05Z","updated_at":"2016-07-04T11:43:06Z","pushed_at":"2016-09-28T10:48:18Z","git_url":"git://github.com/elifesciences/builder.git","ssh_url":"git@github.com:elifesciences/builder.git","clone_url":"https://github.com/elifesciences/builder.git","svn_url":"https://github.com/elifesciences/builder","homepage":null,"size":623,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"elifesciences:master","ref":"master","sha":"de36b964d62f4c95a1889f6544e7cbe58be7c8e1","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars.githubusercontent.com/u/1777367?v=3","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":56778863,"name":"builder","full_name":"elifesciences/builder","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars.githubusercontent.com/u/1777367?v=3","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/builder","description":"","fork":false,"url":"https://api.github.com/repos/elifesciences/builder","forks_url":"https://api.github.com/repos/elifesciences/builder/forks","keys_url":"https://api.github.com/repos/elifesciences/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/builder/teams","hooks_url":"https://api.github.com/repos/elifesciences/builder/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/builder/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/builder/events","assignees_url":"https://api.github.com/repos/elifesciences/builder/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/builder/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/builder/tags","blobs_url":"https://api.github.com/repos/elifesciences/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/builder/languages","stargazers_url":"https://api.github.com/repos/elifesciences/builder/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/builder/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/builder/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/builder/subscription","commits_url":"https://api.github.com/repos/elifesciences/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/builder/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/builder/merges","archive_url":"https://api.github.com/repos/elifesciences/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/builder/downloads","issues_url":"https://api.github.com/repos/elifesciences/builder/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/builder/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/builder/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/builder/deployments","created_at":"2016-04-21T14:08:05Z","updated_at":"2016-07-04T11:43:06Z","pushed_at":"2016-09-28T10:48:18Z","git_url":"git://github.com/elifesciences/builder.git","ssh_url":"git@github.com:elifesciences/builder.git","clone_url":"https://github.com/elifesciences/builder.git","svn_url":"https://github.com/elifesciences/builder","homepage":null,"size":623,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/55"},"html":{"href":"https://github.com/elifesciences/builder/pull/55"},"issue":{"href":"https://api.github.com/repos/elifesciences/builder/issues/55"},"comments":{"href":"https://api.github.com/repos/elifesciences/builder/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elifesciences/builder/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/elifesciences/builder/statuses/6bd0f99c1be7d5260110e567f9ed4b51e2c26cbd"}}}}
{"actor":{"display_login":"giorgiosironi"}}