diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-03-05 17:47:48 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-03-05 17:47:48 +0000 |
commit | 5e4184a673a3043dd82a2f874338852c3dad3127 (patch) | |
tree | 3e502a3b7a12fcb99fd21cdffcc63cdf258ccab9 | |
parent | c95a550b89724c255769d4fee2f8f9fababe7e75 (diff) | |
download | rabbitmq-server-5e4184a673a3043dd82a2f874338852c3dad3127.tar.gz |
cosmetic, plus report Pid instead of {ok, Pid}
-rw-r--r-- | src/rabbit_mirror_queue_misc.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl index db7d8ecc..180677fe 100644 --- a/src/rabbit_mirror_queue_misc.erl +++ b/src/rabbit_mirror_queue_misc.erl @@ -134,18 +134,17 @@ add_mirror(Queue, MirrorNode) -> Queue, fun (#amqqueue { name = Name, pid = QPid, slave_pids = SPids } = Q) -> case [Pid || Pid <- [QPid | SPids], node(Pid) =:= MirrorNode] of - [] -> Result = rabbit_mirror_queue_slave_sup:start_child( - MirrorNode, [Q]), - case Result of + [] -> case rabbit_mirror_queue_slave_sup:start_child( + MirrorNode, [Q]) of {ok, undefined} -> %% Already running ok; - {ok, _Pid} -> + {ok, SPid} -> rabbit_log:info( "Adding mirror of ~s on node ~p: ~p~n", - [rabbit_misc:rs(Name), MirrorNode, Result]), + [rabbit_misc:rs(Name), MirrorNode, SPid]), ok; - _ -> - Result + Other -> + Other end; [_] -> {error, {queue_already_mirrored_on_node, MirrorNode}} end |