diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2008-09-09 16:15:09 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2008-09-09 16:15:09 +0100 |
commit | cee9b87eed4228d2e9d54b7eb40c5eaf2fc4b327 (patch) | |
tree | 33db49b350583cf121a33a004db8218f367551ad /src/rabbit_multi.erl | |
parent | 3fd8dc51c47715ef167a1e9c39fafac53b393311 (diff) | |
download | rabbitmq-server-cee9b87eed4228d2e9d54b7eb40c5eaf2fc4b327.tar.gz |
Fixed various QA remarks.
Renamed rotate_logs_all to rotate_logs.
logrotate will fail silently to logrotate
if calling rotate_logs on any of the logs
failed.
Diffstat (limited to 'src/rabbit_multi.erl')
-rw-r--r-- | src/rabbit_multi.erl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_multi.erl b/src/rabbit_multi.erl index 29f12ff7..4d00e660 100644 --- a/src/rabbit_multi.erl +++ b/src/rabbit_multi.erl @@ -94,10 +94,10 @@ action(stop_all, [], RpcTimeout) -> stop_nodes(NodePids, RpcTimeout), delete_pids_file() end); -action(rotate_logs_all, [], RpcTimeout) -> - action(rotate_logs_all, [""], RpcTimeout); +action(rotate_logs, [], RpcTimeout) -> + action(rotate_logs, [""], RpcTimeout); -action(rotate_logs_all, [Suffix], RpcTimeout) -> +action(rotate_logs, [Suffix], RpcTimeout) -> io:format("Rotating logs for all nodes...~n", []), call_all_nodes(fun(NodePids) -> rotate_logs(NodePids, @@ -283,11 +283,12 @@ is_dead(Pid) -> rotate_logs([], _, _) -> ok; rotate_logs([{Node, _} | Rest], BinarySuffix, RpcTimeout) -> - io:format("Rotating logs for node ~p~n", [Node]), + io:format("Rotating logs for node ~p", [Node]), case rpc:call(Node, rabbit, rotate_logs, [BinarySuffix], RpcTimeout) of - {badrpc, _} -> io:format("timeout"), - throw(rotate_logs_failed); - ok -> rotate_logs(Rest, BinarySuffix, RpcTimeout) + {badrpc, Error} -> io:format(": ~p.~n", [Error]), + throw(rotate_logs_failed); + ok -> io:format(": ok.~n", []), + rotate_logs(Rest, BinarySuffix, RpcTimeout) end. call_all_nodes(Func) -> |