fix(prometheus): dialyzer
This commit is contained in:
parent
e908973a86
commit
20c5343f9b
|
@ -71,12 +71,12 @@ prometheus(put, #{body := Body}) ->
|
||||||
Body,
|
Body,
|
||||||
#{rawconf_with_defaults => true, override_to => cluster}) of
|
#{rawconf_with_defaults => true, override_to => cluster}) of
|
||||||
{ok, #{raw_config := NewConfig, config := Config}} ->
|
{ok, #{raw_config := NewConfig, config := Config}} ->
|
||||||
case maps:get(<<"enable">>, Body) of
|
case maps:get(<<"enable">>, Body, true) of
|
||||||
true ->
|
true ->
|
||||||
_ = emqx_prometheus_sup:stop_child(?APP),
|
ok = emqx_prometheus_sup:stop_child(?APP),
|
||||||
emqx_prometheus_sup:start_child(?APP, Config);
|
ok = emqx_prometheus_sup:start_child(?APP, Config);
|
||||||
false ->
|
false ->
|
||||||
_ = emqx_prometheus_sup:stop_child(?APP)
|
ok = emqx_prometheus_sup:stop_child(?APP)
|
||||||
end,
|
end,
|
||||||
{200, NewConfig};
|
{200, NewConfig};
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
|
|
Loading…
Reference in New Issue