fix: bridge v2 `on_query` matched ChannelId
This commit is contained in:
parent
00d50479f5
commit
1d58092176
|
@ -128,9 +128,9 @@
|
||||||
%% -type size() :: integer().
|
%% -type size() :: integer().
|
||||||
|
|
||||||
-type state() :: #{
|
-type state() :: #{
|
||||||
|
installed_channels := map(),
|
||||||
pool_name := binary(),
|
pool_name := binary(),
|
||||||
resource_opts := map(),
|
resource_opts := map()
|
||||||
sql_templates := map()
|
|
||||||
}.
|
}.
|
||||||
|
|
||||||
%%====================================================================
|
%%====================================================================
|
||||||
|
@ -288,14 +288,14 @@ on_stop(InstanceId, _State) ->
|
||||||
|
|
||||||
-spec on_query(
|
-spec on_query(
|
||||||
resource_id(),
|
resource_id(),
|
||||||
{?ACTION_SEND_MESSAGE, map()},
|
Query :: {channel_id(), map()},
|
||||||
state()
|
state()
|
||||||
) ->
|
) ->
|
||||||
ok
|
ok
|
||||||
| {ok, list()}
|
| {ok, list()}
|
||||||
| {error, {recoverable_error, term()}}
|
| {error, {recoverable_error, term()}}
|
||||||
| {error, term()}.
|
| {error, term()}.
|
||||||
on_query(ResourceId, {?ACTION_SEND_MESSAGE, _Msg} = Query, State) ->
|
on_query(ResourceId, {_ChannelId, _Msg} = Query, State) ->
|
||||||
?TRACE(
|
?TRACE(
|
||||||
"SINGLE_QUERY_SYNC",
|
"SINGLE_QUERY_SYNC",
|
||||||
"bridge_sqlserver_received",
|
"bridge_sqlserver_received",
|
||||||
|
@ -305,7 +305,7 @@ on_query(ResourceId, {?ACTION_SEND_MESSAGE, _Msg} = Query, State) ->
|
||||||
|
|
||||||
-spec on_batch_query(
|
-spec on_batch_query(
|
||||||
resource_id(),
|
resource_id(),
|
||||||
[{?ACTION_SEND_MESSAGE, map()}],
|
[{channel_id(), map()}],
|
||||||
state()
|
state()
|
||||||
) ->
|
) ->
|
||||||
ok
|
ok
|
||||||
|
@ -383,7 +383,7 @@ conn_str([{_, _} | Opts], Acc) ->
|
||||||
%% Query with singe & batch sql statement
|
%% Query with singe & batch sql statement
|
||||||
-spec do_query(
|
-spec do_query(
|
||||||
resource_id(),
|
resource_id(),
|
||||||
Query :: {?ACTION_SEND_MESSAGE, map()} | [{?ACTION_SEND_MESSAGE, map()}],
|
Query :: {channel_id(), map()} | [{channel_id(), map()}],
|
||||||
ApplyMode :: handover,
|
ApplyMode :: handover,
|
||||||
state()
|
state()
|
||||||
) ->
|
) ->
|
||||||
|
|
|
@ -59,7 +59,7 @@ sqlserver_action.label:
|
||||||
"""Microsoft SOL Server Action Configuration"""
|
"""Microsoft SOL Server Action Configuration"""
|
||||||
|
|
||||||
config_connector.desc:
|
config_connector.desc:
|
||||||
"""Configuration for an Microsoft SOL Server connector."""
|
"""Configuration for a Microsoft SOL Server connector."""
|
||||||
|
|
||||||
config_connector.label:
|
config_connector.label:
|
||||||
"""Microsoft SOL Server Connector Configuration"""
|
"""Microsoft SOL Server Connector Configuration"""
|
||||||
|
|
Loading…
Reference in New Issue