feat: add stop after render and after render trace to opents action

This commit is contained in:
Kjell Winblad 2024-04-24 13:53:58 +02:00
parent 9d6655bc30
commit e2b35ea242
1 changed files with 4 additions and 2 deletions

View File

@ -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}),