fix(config): update config by emqx_conf
This commit is contained in:
parent
31aed3ea8e
commit
6c574c08b8
|
@ -73,7 +73,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% update new config
|
%% update new config
|
||||||
update(Config) ->
|
update(Config) ->
|
||||||
case emqx:update_config([prometheus], Config,
|
case emqx_conf:update([prometheus], Config,
|
||||||
#{rawconf_with_defaults => true, override_to => cluster}) of
|
#{rawconf_with_defaults => true, override_to => cluster}) of
|
||||||
{ok, #{raw_config := NewConfigRows}} ->
|
{ok, #{raw_config := NewConfigRows}} ->
|
||||||
case maps:get(<<"enable">>, Config, true) of
|
case maps:get(<<"enable">>, Config, true) of
|
||||||
|
|
|
@ -57,14 +57,14 @@
|
||||||
}).
|
}).
|
||||||
|
|
||||||
update(Config) ->
|
update(Config) ->
|
||||||
case emqx:update_config([statsd],
|
case emqx_conf:update([statsd],
|
||||||
Config,
|
Config,
|
||||||
#{rawconf_with_defaults => true, override_to => cluster}) of
|
#{rawconf_with_defaults => true, override_to => cluster}) of
|
||||||
{ok, #{raw_config := NewConfigRows}} ->
|
{ok, #{raw_config := NewConfigRows}} ->
|
||||||
_ = start(),
|
ok = stop(),
|
||||||
case maps:get(<<"enable">>, Config, true) of
|
case maps:get(<<"enable">>, Config, true) of
|
||||||
true ->
|
true ->
|
||||||
ok = stop();
|
ok = start();
|
||||||
false ->
|
false ->
|
||||||
ignore
|
ignore
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue