fix(iotdb): make dialyzer happy
This commit is contained in:
parent
c3a2cf6220
commit
0bebd66f05
|
@ -9,6 +9,7 @@
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("hocon/include/hoconsc.hrl").
|
-include_lib("hocon/include/hoconsc.hrl").
|
||||||
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
||||||
|
-include_lib("emqx_resource/include/emqx_resource.hrl").
|
||||||
|
|
||||||
%% `emqx_resource' API
|
%% `emqx_resource' API
|
||||||
-export([
|
-export([
|
||||||
|
@ -70,8 +71,6 @@
|
||||||
|
|
||||||
-import(hoconsc, [mk/2, enum/1, ref/2]).
|
-import(hoconsc, [mk/2, enum/1, ref/2]).
|
||||||
|
|
||||||
-dialyzer({no_match, [on_get_channel_status/3]}).
|
|
||||||
|
|
||||||
%%-------------------------------------------------------------------------------------
|
%%-------------------------------------------------------------------------------------
|
||||||
%% connector examples
|
%% connector examples
|
||||||
%%-------------------------------------------------------------------------------------
|
%%-------------------------------------------------------------------------------------
|
||||||
|
@ -240,7 +239,7 @@ on_stop(InstanceId, State) ->
|
||||||
Res.
|
Res.
|
||||||
|
|
||||||
-spec on_get_status(manager_id(), state()) ->
|
-spec on_get_status(manager_id(), state()) ->
|
||||||
{connected, state()} | {disconnected, state(), term()}.
|
connected | connecting | {disconnected, state(), term()}.
|
||||||
on_get_status(InstanceId, #{base_path := BasePath} = State) ->
|
on_get_status(InstanceId, #{base_path := BasePath} = State) ->
|
||||||
Func = fun(Worker, Timeout) ->
|
Func = fun(Worker, Timeout) ->
|
||||||
Request = {?IOTDB_PING_PATH, [], undefined},
|
Request = {?IOTDB_PING_PATH, [], undefined},
|
||||||
|
@ -375,10 +374,10 @@ on_get_channels(InstanceId) ->
|
||||||
|
|
||||||
on_get_channel_status(InstanceId, _ChannelId, State) ->
|
on_get_channel_status(InstanceId, _ChannelId, State) ->
|
||||||
case on_get_status(InstanceId, State) of
|
case on_get_status(InstanceId, State) of
|
||||||
connected ->
|
?status_connected ->
|
||||||
connected;
|
?status_connected;
|
||||||
_ ->
|
_ ->
|
||||||
disconnected
|
?status_disconnected
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Enhanced health checking for IOTDB connector, using its `ping` API replacing the old method which only validating via a socket connection.
|
Enhanced health checking for IoTDB connector, using its `ping` API instead of just checking for an existing socket connection.
|
||||||
|
|
Loading…
Reference in New Issue