@@ -43,7 +43,7 @@ start_child({VHost, ShovelName} = Name, Def) ->
4343 rabbit_log_shovel :debug (" Starting a mirrored supervisor named '~ts ' in virtual host '~ts '" , [ShovelName , VHost ]),
4444 Result = case mirrored_supervisor :start_child (
4545 ? SUPERVISOR ,
46- {Name , {rabbit_shovel_dyn_worker_sup , start_link , [Name , obfuscated_uris_parameters (Def )]},
46+ {id ( Name ) , {rabbit_shovel_dyn_worker_sup , start_link , [Name , obfuscated_uris_parameters (Def )]},
4747 transient , ? WORKER_WAIT , worker , [rabbit_shovel_dyn_worker_sup ]}) of
4848 {ok , _Pid } -> ok ;
4949 {error , {already_started , _Pid }} -> ok
@@ -58,7 +58,7 @@ obfuscated_uris_parameters(Def) when is_list(Def) ->
5858 rabbit_shovel_parameters :obfuscate_uris_in_definition (Def ).
5959
6060child_exists (Name ) ->
61- lists :any (fun ({N , _ , _ , _ }) -> N =:= Name end ,
61+ lists :any (fun ({{ _ , N } , _ , _ , _ }) -> N =:= Name end ,
6262 mirrored_supervisor :which_children (? SUPERVISOR )).
6363
6464stop_child ({VHost , ShovelName } = Name ) ->
@@ -67,8 +67,8 @@ stop_child({VHost, ShovelName} = Name) ->
6767 case get ({shovel_worker_autodelete , Name }) of
6868 true -> ok ; % % [1]
6969 _ ->
70- ok = mirrored_supervisor :terminate_child (? SUPERVISOR , Name ),
71- ok = mirrored_supervisor :delete_child (? SUPERVISOR , Name ),
70+ ok = mirrored_supervisor :terminate_child (? SUPERVISOR , id ( Name ) ),
71+ ok = mirrored_supervisor :delete_child (? SUPERVISOR , id ( Name ) ),
7272 rabbit_shovel_status :remove (Name )
7373 end ,
7474 rabbit_shovel_locks :unlock (LockId ),
@@ -98,4 +98,4 @@ init([]) ->
9898 {ok , {{one_for_one , 3 , 10 }, []}}.
9999
100100id ({V , S } = Name ) ->
101- {[V , S ], Name }.
101+ {[V , S ], Name }.
0 commit comments