{"action":"created","comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments/39763925","id":39763925,"diff_hunk":"@@ -499,62 +499,71 @@ action(purge_queue, Node, [Q], Opts, Inform, Timeout) ->\n \n action(list_users, Node, [], _Opts, Inform, Timeout) ->\n     Inform(\"Listing users\", []),\n-    display_info_list(\n-      call(Node, {rabbit_auth_backend_internal, list_users, []}, Timeout),\n-      rabbit_auth_backend_internal:user_info_keys());\n+    call(Node, {rabbit_auth_backend_internal, list_users, []}, Ref=make_ref(),\n+         Timeout),\n+    wait_for_info_messages(self(), Ref,\n+                           rabbit_auth_backend_internal:user_info_keys(),\n+                           Timeout);\n \n action(list_permissions, Node, [], Opts, Inform, Timeout) ->\n     VHost = proplists:get_value(?VHOST_OPT, Opts),\n     Inform(\"Listing permissions in vhost \\\"~s\\\"\", [VHost]),\n-    display_info_list(call(Node, {rabbit_auth_backend_internal,\n-                             list_vhost_permissions, [VHost]}, Timeout),\n-                      rabbit_auth_backend_internal:vhost_perms_info_keys());\n+    call(Node,{rabbit_auth_backend_internal, list_vhost_permissions,\n+               [VHost]}, Ref=make_ref(), Timeout),\n+    wait_for_info_messages(self(), Ref,\n+                           rabbit_auth_backend_internal:vhost_perms_info_keys(),\n+                           Timeout);\n \n action(list_parameters, Node, [], Opts, Inform, Timeout) ->\n     VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)),\n     Inform(\"Listing runtime parameters\", []),\n-    display_info_list(\n-      rpc_call(Node, rabbit_runtime_parameters, list_formatted, [VHostArg],\n-               Timeout),\n-      rabbit_runtime_parameters:info_keys());\n+    spawn_link(rabbit_cli, rpc_call, [Node, rabbit_runtime_parameters,\n+                                      list_formatted, [VHostArg], Ref=make_ref(),\n+                                      Pid=self(), Timeout]),\n+    wait_for_info_messages(Pid, Ref, rabbit_runtime_parameters:info_keys(), Timeout);\n \n action(list_policies, Node, [], Opts, Inform, Timeout) ->\n     VHostArg = list_to_binary(proplists:get_value(?VHOST_OPT, Opts)),\n     Inform(\"Listing policies\", []),\n-    display_info_list(rpc_call(Node, rabbit_policy, list_formatted, [VHostArg],\n-                              Timeout),\n-                      rabbit_policy:info_keys());\n+    spawn_link(rabbit_cli, rpc_call, [Node, rabbit_policy, list_formatted,","path":"src/rabbit_control_main.erl","position":58,"original_position":58,"commit_id":"24cb649cbe90eb5bdbe735fde9760626940bb566","original_commit_id":"24cb649cbe90eb5bdbe735fde9760626940bb566","user":{"login":"Ayanda-D","id":12154951,"avatar_url":"https://avatars.githubusercontent.com/u/12154951?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayanda-D","html_url":"https://github.com/Ayanda-D","followers_url":"https://api.github.com/users/Ayanda-D/followers","following_url":"https://api.github.com/users/Ayanda-D/following{/other_user}","gists_url":"https://api.github.com/users/Ayanda-D/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayanda-D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayanda-D/subscriptions","organizations_url":"https://api.github.com/users/Ayanda-D/orgs","repos_url":"https://api.github.com/users/Ayanda-D/repos","events_url":"https://api.github.com/users/Ayanda-D/events{/privacy}","received_events_url":"https://api.github.com/users/Ayanda-D/received_events","type":"User","site_admin":false},"body":"@videlalvaro for your second question, refactor how exactly, into one function? I kept these two separate based on their unrelatedness, and just to make things a bit more readable.","created_at":"2015-09-17T16:01:04Z","updated_at":"2015-09-17T16:01:04Z","html_url":"https://github.com/rabbitmq/rabbitmq-server/pull/303#discussion_r39763925","pull_request_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments/39763925"},"html":{"href":"https://github.com/rabbitmq/rabbitmq-server/pull/303#discussion_r39763925"},"pull_request":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303","id":44564923,"html_url":"https://github.com/rabbitmq/rabbitmq-server/pull/303","diff_url":"https://github.com/rabbitmq/rabbitmq-server/pull/303.diff","patch_url":"https://github.com/rabbitmq/rabbitmq-server/pull/303.patch","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/303","number":303,"state":"open","locked":false,"title":"Make rabbitmqctl list_* operations display things dynamically, fixes #62","user":{"login":"Ayanda-D","id":12154951,"avatar_url":"https://avatars.githubusercontent.com/u/12154951?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayanda-D","html_url":"https://github.com/Ayanda-D","followers_url":"https://api.github.com/users/Ayanda-D/followers","following_url":"https://api.github.com/users/Ayanda-D/following{/other_user}","gists_url":"https://api.github.com/users/Ayanda-D/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayanda-D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayanda-D/subscriptions","organizations_url":"https://api.github.com/users/Ayanda-D/orgs","repos_url":"https://api.github.com/users/Ayanda-D/repos","events_url":"https://api.github.com/users/Ayanda-D/events{/privacy}","received_events_url":"https://api.github.com/users/Ayanda-D/received_events","type":"User","site_admin":false},"body":"Changes made for #62, improving on the timeout introduced in #181 for `rabbitmqctl` list_* operations. Information is now returned dynamically and in piecemeal from the rabbit nodes, as things happen, and terminates upon timeout. ","created_at":"2015-09-09T15:32:12Z","updated_at":"2015-09-17T16:01:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"872e6f90493fc592459b34423b318aefce05f2f3","assignee":{"login":"michaelklishin","id":1090,"avatar_url":"https://avatars.githubusercontent.com/u/1090?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelklishin","html_url":"https://github.com/michaelklishin","followers_url":"https://api.github.com/users/michaelklishin/followers","following_url":"https://api.github.com/users/michaelklishin/following{/other_user}","gists_url":"https://api.github.com/users/michaelklishin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelklishin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelklishin/subscriptions","organizations_url":"https://api.github.com/users/michaelklishin/orgs","repos_url":"https://api.github.com/users/michaelklishin/repos","events_url":"https://api.github.com/users/michaelklishin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelklishin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones/3","html_url":"https://github.com/rabbitmq/rabbitmq-server/milestones/n/a","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones/3/labels","id":1034785,"number":3,"title":"n/a","description":"Not applicable to a specific release","creator":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":165,"state":"closed","created_at":"2015-03-23T17:45:12Z","updated_at":"2015-09-17T14:46:48Z","due_on":null,"closed_at":"2015-03-24T10:00:50Z"},"commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303/commits","review_comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303/comments","review_comment_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/303/comments","statuses_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/24cb649cbe90eb5bdbe735fde9760626940bb566","head":{"label":"rabbitmq:rabbitmq-server-62","ref":"rabbitmq-server-62","sha":"24cb649cbe90eb5bdbe735fde9760626940bb566","user":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":924551,"name":"rabbitmq-server","full_name":"rabbitmq/rabbitmq-server","owner":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rabbitmq/rabbitmq-server","description":"Open source multi-protocol messaging broker","fork":false,"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server","forks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/forks","keys_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/teams","hooks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/hooks","issue_events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/events","assignees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/tags","blobs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/languages","stargazers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/stargazers","contributors_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contributors","subscribers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscribers","subscription_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscription","commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/merges","archive_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/downloads","issues_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/labels{/name}","releases_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/releases{/id}","created_at":"2010-09-20T10:29:16Z","updated_at":"2015-09-16T21:10:22Z","pushed_at":"2015-09-17T15:49:39Z","git_url":"git://github.com/rabbitmq/rabbitmq-server.git","ssh_url":"git@github.com:rabbitmq/rabbitmq-server.git","clone_url":"https://github.com/rabbitmq/rabbitmq-server.git","svn_url":"https://github.com/rabbitmq/rabbitmq-server","homepage":"https://www.rabbitmq.com/","size":105841,"stargazers_count":1033,"watchers_count":1033,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":263,"mirror_url":null,"open_issues_count":58,"forks":263,"open_issues":58,"watchers":1033,"default_branch":"master"}},"base":{"label":"rabbitmq:master","ref":"master","sha":"76f9565ecc25357d894508f61e1d2864176de527","user":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":924551,"name":"rabbitmq-server","full_name":"rabbitmq/rabbitmq-server","owner":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rabbitmq/rabbitmq-server","description":"Open source multi-protocol messaging broker","fork":false,"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server","forks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/forks","keys_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/teams","hooks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/hooks","issue_events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/events","assignees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/tags","blobs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/languages","stargazers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/stargazers","contributors_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contributors","subscribers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscribers","subscription_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscription","commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/merges","archive_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/downloads","issues_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/labels{/name}","releases_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/releases{/id}","created_at":"2010-09-20T10:29:16Z","updated_at":"2015-09-16T21:10:22Z","pushed_at":"2015-09-17T15:49:39Z","git_url":"git://github.com/rabbitmq/rabbitmq-server.git","ssh_url":"git@github.com:rabbitmq/rabbitmq-server.git","clone_url":"https://github.com/rabbitmq/rabbitmq-server.git","svn_url":"https://github.com/rabbitmq/rabbitmq-server","homepage":"https://www.rabbitmq.com/","size":105841,"stargazers_count":1033,"watchers_count":1033,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":263,"mirror_url":null,"open_issues_count":58,"forks":263,"open_issues":58,"watchers":1033,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303"},"html":{"href":"https://github.com/rabbitmq/rabbitmq-server/pull/303"},"issue":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/303"},"comments":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/24cb649cbe90eb5bdbe735fde9760626940bb566"}}}}