Skip to content

Commit 88ea37b

Browse files
Shovel: use a constant for the runtime parameter component
1 parent 81caabc commit 88ea37b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

deps/rabbitmq_shovel/include/rabbit_shovel.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}).
2626

2727
-define(SHOVEL_USER, <<"rmq-shovel">>).
28-
28+
-define(SHOVEL_COMPONENT, <<"shovel">>).
2929
-define(DEFAULT_PREFETCH, 1000).
3030
-define(DEFAULT_ACK_MODE, on_confirm).
3131
-define(DEFAULT_RECONNECT_DELAY, 5).

deps/rabbitmq_shovel/src/rabbit_shovel_dyn_worker_sup_sup.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
-include_lib("kernel/include/logger.hrl").
1818
-include_lib("logging.hrl").
1919
-include_lib("rabbit_common/include/rabbit.hrl").
20+
-include("rabbit_shovel.hrl").
2021
-define(SUPERVISOR, ?MODULE).
2122

2223
start_link() ->
@@ -29,7 +30,7 @@ start_link() ->
2930
OpMode = rabbit_shovel_operating_mode:operating_mode(),
3031
Shovels = case OpMode of
3132
standard ->
32-
rabbit_runtime_parameters:list_component(<<"shovel">>);
33+
rabbit_runtime_parameters:list_component(?SHOVEL_COMPONENT);
3334
_Other ->
3435
%% when operating in a non-standard mode, do not start any shovels
3536
[]
@@ -117,7 +118,7 @@ cleanup_specs() ->
117118
[id({proplists:get_value(vhost, S),
118119
proplists:get_value(name, S)})
119120
|| S <- rabbit_runtime_parameters:list_component(
120-
<<"shovel">>)]),
121+
?SHOVEL_COMPONENT)]),
121122
%% Delete any supervisor children that do not have their respective runtime parameters in the database.
122123
lists:foreach(
123124
fun

0 commit comments

Comments
 (0)