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