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 | 7088e40de2a37f011f5a131dfd0a33c8c406426f (patch) | |
| tree | 33db49b350583cf121a33a004db8218f367551ad /src | |
| parent | 99ccc207256b47a7ff786614cc9162b2adbf8cb4 (diff) | |
| download | rabbitmq-server-git-7088e40de2a37f011f5a131dfd0a33c8c406426f.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')
| -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 29f12ff717..4d00e660e2 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) -> |
