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