fix(connector resource): use configuration `resource_opts` for health check interval when starting up

Fixes https://emqx.atlassian.net/browse/EMQX-12738
This commit is contained in:
Thales Macedo Garitezi 2024-07-22 11:31:10 -03:00
parent a2bed1efb8
commit 8ae54ac325
2 changed files with 5 additions and 2 deletions

View File

@ -351,8 +351,10 @@ safe_atom(Bin) when is_binary(Bin) -> binary_to_existing_atom(Bin, utf8);
safe_atom(Atom) when is_atom(Atom) -> Atom. safe_atom(Atom) when is_atom(Atom) -> Atom.
parse_opts(Conf, Opts0) -> parse_opts(Conf, Opts0) ->
Opts1 = override_start_after_created(Conf, Opts0), Opts1 = emqx_resource:fetch_creation_opts(Conf),
set_no_buffer_workers(Opts1). Opts2 = maps:merge(Opts1, Opts0),
Opts = override_start_after_created(Conf, Opts2),
set_no_buffer_workers(Opts).
override_start_after_created(Config, Opts) -> override_start_after_created(Config, Opts) ->
Enabled = maps:get(enable, Config, true), Enabled = maps:get(enable, Config, true),

View File

@ -0,0 +1 @@
Fixed an issue where a connector wouldn't respect the configured health check interval when first starting up, and would need an update/restart for the correct value to take effect.