diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2012-07-20 17:15:35 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2012-07-20 17:15:35 +0100 |
| commit | 1c9c4ba0e6132c82a6dd9bc694f882a004454094 (patch) | |
| tree | a2d0096bbe62a49bd3e45cd657735e2ed76137b9 | |
| parent | 22971720dd953799a9dfccdfb882b7d101859b94 (diff) | |
| parent | 1ac7c653561ffa8b93bc97e0ede94a4085be3a98 (diff) | |
| download | rabbitmq-server-git-1c9c4ba0e6132c82a6dd9bc694f882a004454094.tar.gz | |
Merged bug25059 into default
| -rw-r--r-- | src/rabbit_control_main.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index b23088cc7a..0dda32f1f1 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -190,11 +190,11 @@ print_report(Node, {Descr, Module, InfoFun, KeysFun}, VHostArg) -> print_report0(Node, {Module, InfoFun, KeysFun}, VHostArg). print_report0(Node, {Module, InfoFun, KeysFun}, VHostArg) -> - case Results = rpc_call(Node, Module, InfoFun, VHostArg) of - [_|_] -> InfoItems = rpc_call(Node, Module, KeysFun, []), - display_row([atom_to_list(I) || I <- InfoItems]), - display_info_list(Results, InfoItems); - _ -> ok + case rpc_call(Node, Module, InfoFun, VHostArg) of + [_|_] = Results -> InfoItems = rpc_call(Node, Module, KeysFun, []), + display_row([atom_to_list(I) || I <- InfoItems]), + display_info_list(Results, InfoItems); + _ -> ok end, io:nl(). @@ -432,14 +432,13 @@ action(list_parameters, Node, Args = [], _Opts, Inform) -> rabbit_runtime_parameters:info_keys()); action(report, Node, _Args, _Opts, Inform) -> - io:format("Reporting server status on ~p~n~n", [erlang:universaltime()]), + Inform("Reporting server status on ~p~n~n", [erlang:universaltime()]), [begin ok = action(Action, N, [], [], Inform), io:nl() end || N <- unsafe_rpc(Node, rabbit_mnesia, running_clustered_nodes, []), Action <- [status, cluster_status, environment]], VHosts = unsafe_rpc(Node, rabbit_vhost, list, []), [print_report(Node, Q) || Q <- ?GLOBAL_QUERIES], [print_report(Node, Q, [V]) || Q <- ?VHOST_QUERIES, V <- VHosts], - io:format("End of server status report~n"), ok; action(eval, Node, [Expr], _Opts, _Inform) -> |
