diff options
author | Tim Watson <tim@rabbitmq.com> | 2012-07-23 11:46:16 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2012-07-23 11:46:16 +0100 |
commit | 75d06882fd4f755916f0ad7aebe55777fbe45357 (patch) | |
tree | 14709515cf54a810e71c452beb241978336c3bd2 | |
parent | 13151d3a9627be9103d3126a0f229d3728f40397 (diff) | |
parent | 1b33df4f232adfa198a1b0f261c15e33b97dcb74 (diff) | |
download | rabbitmq-server-bug25023.tar.gz |
merge default into bug25023bug25023
-rw-r--r-- | src/rabbit_amqqueue.erl | 2 | ||||
-rw-r--r-- | src/rabbit_control_main.erl | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index ff29a846..d82ac266 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -599,7 +599,7 @@ on_node_down(Node) -> slave_pids = []} <- mnesia:table(rabbit_queue), node(Pid) == Node andalso - not is_process_alive(Pid)])), + not rabbit_misc:is_process_alive(Pid)])), {Qs, Dels} = lists:unzip(QsDels), T = rabbit_binding:process_deletions( lists:foldl(fun rabbit_binding:combine_deletions/2, 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) -> |