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