fix(bpapi): make bpapi static_checks happy
This commit is contained in:
parent
62ecf6f545
commit
f0c2b53868
|
@ -104,7 +104,7 @@ username(_) -> undefined.
|
|||
password(type) -> binary();
|
||||
password(desc) -> ?DESC("password");
|
||||
password(required) -> false;
|
||||
password(format) -> <<"format">>;
|
||||
password(format) -> <<"password">>;
|
||||
password(_) -> undefined.
|
||||
|
||||
auto_reconnect(type) -> boolean();
|
||||
|
|
|
@ -50,7 +50,8 @@
|
|||
auto_retry_interval => integer(),
|
||||
%%======================================= Deprecated Opts End
|
||||
worker_pool_size => pos_integer(),
|
||||
health_check_interval => pos_integer(),
|
||||
%% use `integer()` compatibility to release 5.0.0 bpapi
|
||||
health_check_interval => integer(),
|
||||
%% We can choose to block the return of emqx_resource:start until
|
||||
%% the resource connected, wait max to `start_timeout` ms.
|
||||
start_timeout => pos_integer(),
|
||||
|
|
|
@ -385,30 +385,14 @@ handle_event(EventType, EventData, State, Data) ->
|
|||
insert_cache(ResId, Group, Data = #data{manager_id = MgrId}) ->
|
||||
case get_owner(ResId) of
|
||||
not_found ->
|
||||
?SLOG(
|
||||
debug,
|
||||
#{
|
||||
msg => resource_owner_not_found,
|
||||
resource_id => ResId,
|
||||
action => auto_insert_cache
|
||||
}
|
||||
),
|
||||
ets:insert(?ETS_TABLE, {ResId, Group, Data});
|
||||
MgrId ->
|
||||
?SLOG(
|
||||
debug,
|
||||
#{
|
||||
msg => resource_owner_matched,
|
||||
resource_id => ResId,
|
||||
action => reinsert_cache
|
||||
}
|
||||
),
|
||||
ets:insert(?ETS_TABLE, {ResId, Group, Data});
|
||||
_ ->
|
||||
?SLOG(error, #{
|
||||
msg => get_resource_owner_failed,
|
||||
resource_id => ResId,
|
||||
action => quit_rusource
|
||||
action => quit_resource
|
||||
}),
|
||||
self() ! quit
|
||||
end.
|
||||
|
|
Loading…
Reference in New Issue