Merge pull request #7740 from DDDHuang/statsd_pro_restart

fix: statsd & prometheus update config with restart & stop
This commit is contained in:
DDDHuang 2022-04-24 16:44:01 +08:00 committed by GitHub
commit f661d3d17b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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])).

View File

@ -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} ->