From da7663b62bbd9da7a7c11b0691ca883c61bdf7ae Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 4 Jul 2012 12:57:48 +0100 Subject: Rename "federation connection" to "upstream", underscores to hyphens in everything parameter-related. --- .../rabbitmq_federation/src/rabbit_federation_link_sup.erl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'deps/rabbitmq_federation/src/rabbit_federation_link_sup.erl') diff --git a/deps/rabbitmq_federation/src/rabbit_federation_link_sup.erl b/deps/rabbitmq_federation/src/rabbit_federation_link_sup.erl index 47b3ebcbf2..f68fb5c9d3 100644 --- a/deps/rabbitmq_federation/src/rabbit_federation_link_sup.erl +++ b/deps/rabbitmq_federation/src/rabbit_federation_link_sup.erl @@ -33,9 +33,9 @@ adjust(Sup, X, everything) -> {Upstream, _, _, _} <- supervisor2:which_children(Sup)], [{ok, _Pid} = supervisor2:start_child(Sup, Spec) || Spec <- specs(X)]; -adjust(Sup, X, {connection, ConnName}) -> - OldUpstreams0 = children(Sup, ConnName), - NewUpstreams0 = rabbit_federation_upstream:for(X, ConnName), +adjust(Sup, X, {upstream, UpstreamName}) -> + OldUpstreams0 = children(Sup, UpstreamName), + NewUpstreams0 = rabbit_federation_upstream:for(X, UpstreamName), %% If any haven't changed, don't restart them. The broker will %% avoid telling us about connections that have not changed %% syntactically, but even if one has, this X may not have that @@ -51,10 +51,10 @@ adjust(Sup, X, {connection, ConnName}) -> [stop(Sup, OldUpstream) || OldUpstream <- OldUpstreams], [start(Sup, NewUpstream, X) || NewUpstream <- NewUpstreams]; -adjust(Sup, X = #exchange{name = XName}, {clear_connection, ConnName}) -> +adjust(Sup, X = #exchange{name = XName}, {clear_upstream, UpstreamName}) -> ok = rabbit_federation_db:prune_scratch( XName, rabbit_federation_upstream:for(X)), - [stop(Sup, Upstream) || Upstream <- children(Sup, ConnName)]; + [stop(Sup, Upstream) || Upstream <- children(Sup, UpstreamName)]; %% TODO handle changes of upstream sets minimally (bug 24853) adjust(Sup, X = #exchange{name = XName}, {upstream_set, Set}) -> @@ -81,9 +81,9 @@ stop(Sup, Upstream) -> %% remove it here too. rabbit_federation_status:remove_upstream(Upstream). -children(Sup, ConnName) -> +children(Sup, UpstreamName) -> rabbit_federation_util:find_upstreams( - ConnName, [U || {U, _, _, _} <- supervisor2:which_children(Sup)]). + UpstreamName, [U || {U, _, _, _} <- supervisor2:which_children(Sup)]). %%---------------------------------------------------------------------------- -- cgit v1.2.1