fix(mqtt-connector): faster shutdown

This commit is contained in:
Zaiming (Stone) Shi 2023-05-17 21:53:35 +02:00
parent 7eef86363a
commit 5bbcf4b712
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
%% -*- mode: erlang -*- %% -*- mode: erlang -*-
{application, emqx_connector, [ {application, emqx_connector, [
{description, "EMQX Data Integration Connectors"}, {description, "EMQX Data Integration Connectors"},
{vsn, "0.1.22"}, {vsn, "0.1.23"},
{registered, []}, {registered, []},
{mod, {emqx_connector_app, []}}, {mod, {emqx_connector_app, []}},
{applications, [ {applications, [

View File

@ -112,7 +112,7 @@ bridge_spec(Config) ->
id => Name, id => Name,
start => {emqx_connector_mqtt_worker, start_link, [Name, NConfig]}, start => {emqx_connector_mqtt_worker, start_link, [Name, NConfig]},
restart => temporary, restart => temporary,
shutdown => 5000 shutdown => 1000
}. }.
-spec bridges() -> [{_Name, _Status}]. -spec bridges() -> [{_Name, _Status}].
@ -181,7 +181,7 @@ on_stop(_InstId, #{name := InstanceId}) ->
ok; ok;
{error, Reason} -> {error, Reason} ->
?SLOG(error, #{ ?SLOG(error, #{
msg => "stop_mqtt_connector", msg => "stop_mqtt_connector_error",
connector => InstanceId, connector => InstanceId,
reason => Reason reason => Reason
}) })