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 | 1b33df4f232adfa198a1b0f261c15e33b97dcb74 (patch) | |
tree | a2d0096bbe62a49bd3e45cd657735e2ed76137b9 | |
parent | 86c233de294e88788fd7e2804c337ab0ef6df8d7 (diff) | |
parent | 3647e1e59eda0c2b23e51d7e215bee99aaf876c1 (diff) | |
download | rabbitmq-server-1b33df4f232adfa198a1b0f261c15e33b97dcb74.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 b23088cc..0dda32f1 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) -> |