Don't get confused due to changing our own scratch!
This commit is contained in:
parent
d972b8f282
commit
20d8d6c0a0
|
|
@ -31,10 +31,10 @@ start_link() ->
|
|||
mirrored_supervisor:start_link({local, ?SUPERVISOR},
|
||||
?SUPERVISOR, ?MODULE, []).
|
||||
|
||||
start_child(Id, Args) ->
|
||||
start_child(X, Args) ->
|
||||
{ok, _Pid} = mirrored_supervisor:start_child(
|
||||
?SUPERVISOR,
|
||||
{Id, {rabbit_federation_link_sup, start_link, [Args]},
|
||||
{id(X), {rabbit_federation_link_sup, start_link, [Args]},
|
||||
transient, ?MAX_WAIT, supervisor,
|
||||
[rabbit_federation_link_sup]}).
|
||||
|
||||
|
|
@ -43,11 +43,14 @@ adjust(Reason) ->
|
|||
{Id, Pid, _, _} <- mirrored_supervisor:which_children(?SUPERVISOR)],
|
||||
ok.
|
||||
|
||||
stop_child(Id) ->
|
||||
ok = mirrored_supervisor:terminate_child(?SUPERVISOR, Id),
|
||||
ok = mirrored_supervisor:delete_child(?SUPERVISOR, Id).
|
||||
stop_child(X) ->
|
||||
ok = mirrored_supervisor:terminate_child(?SUPERVISOR, id(X)),
|
||||
ok = mirrored_supervisor:delete_child(?SUPERVISOR, id(X)).
|
||||
|
||||
%%----------------------------------------------------------------------------
|
||||
|
||||
init([]) ->
|
||||
{ok, {{one_for_one, 3, 10}, []}}.
|
||||
|
||||
id(X) ->
|
||||
X#exchange{scratches = undefined}.
|
||||
|
|
|
|||
Loading…
Reference in New Issue