fix: statsd & prometheus update config with restart & stop
This commit is contained in:
parent
12d7975c36
commit
c842a51be3
|
@ -95,8 +95,8 @@ stop() ->
|
|||
ok.
|
||||
|
||||
restart() ->
|
||||
stop(),
|
||||
stop().
|
||||
ok = stop(),
|
||||
ok = start().
|
||||
|
||||
do_start() ->
|
||||
emqx_prometheus_sup:start_child(?APP, emqx_conf:get([prometheus])).
|
||||
|
|
|
@ -70,9 +70,9 @@ update(Config) ->
|
|||
ok = stop(),
|
||||
case maps:get(<<"enable">>, Config, true) of
|
||||
true ->
|
||||
ok = start();
|
||||
ok = restart();
|
||||
false ->
|
||||
ignore
|
||||
ok = stop()
|
||||
end,
|
||||
{ok, NewConfigRows};
|
||||
{error, Reason} ->
|
||||
|
|
Loading…
Reference in New Issue