|
|
@@ -167,9 +167,10 @@ on_batch_query(
|
|
|
BatchReq,
|
|
|
#{channels := Channels} = State
|
|
|
) ->
|
|
|
+ [{ChannelId, _} | _] = BatchReq,
|
|
|
case try_render_messages(BatchReq, Channels) of
|
|
|
{ok, Datas} ->
|
|
|
- do_query(InstanceId, Datas, State);
|
|
|
+ do_query(InstanceId, ChannelId, Datas, State);
|
|
|
Error ->
|
|
|
Error
|
|
|
end.
|
|
|
@@ -222,12 +223,13 @@ on_get_channel_status(InstanceId, ChannelId, #{channels := Channels} = State) ->
|
|
|
%% Helper fns
|
|
|
%%========================================================================================
|
|
|
|
|
|
-do_query(InstanceId, Query, #{pool_name := PoolName} = State) ->
|
|
|
+do_query(InstanceId, ChannelID, Query, #{pool_name := PoolName} = State) ->
|
|
|
?TRACE(
|
|
|
"QUERY",
|
|
|
"opents_connector_received",
|
|
|
#{connector => InstanceId, query => Query, state => State}
|
|
|
),
|
|
|
+ emqx_trace:rendered_action_template(ChannelID, #{query => Query}),
|
|
|
|
|
|
?tp(opents_bridge_on_query, #{instance_id => InstanceId}),
|
|
|
|