Skip to content

Commit 7f1ceb2

Browse files
committed
Shovel: fix deletion of terminated shovels
1 parent 99fea41 commit 7f1ceb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deps/rabbitmq_shovel/src/Elixir.RabbitMQ.CLI.Ctl.Commands.DeleteShovelCommand.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@ run([Name], #{node := Node, vhost := VHost, force := Force}) ->
8080
undefined ->
8181
try_force_removing(Node, VHost, Name, ActingUser),
8282
{error, rabbit_data_coercion:to_binary(ErrMsg)};
83+
{{_Name, _VHost}, _Type, {terminated, _}, _Metrics, _Timestamp} ->
84+
delete_shovel(ErrMsg, VHost, Name, ActingUser, Node, Node);
8385
{{_Name, _VHost}, _Type, {_State, Opts}, _Metrics, _Timestamp} ->
8486
HostingNode = proplists:get_value(node, Opts, Node),
8587
delete_shovel(ErrMsg, VHost, Name, ActingUser, HostingNode, Node);
88+
{{_Name, _VHost}, _Type, {terminated, _}, _Timestamp} ->
89+
delete_shovel(ErrMsg, VHost, Name, ActingUser, Node, Node);
8690
{{_Name, _VHost}, _Type, {_State, Opts}, _Timestamp} ->
8791
HostingNode = proplists:get_value(node, Opts, Node),
8892
delete_shovel(ErrMsg, VHost, Name, ActingUser, HostingNode, Node)

0 commit comments

Comments
 (0)