fix: fix bad code

This commit is contained in:
zhouzb 2022-04-28 16:51:36 +08:00
parent bd0d0d9797
commit 95e63fcadf
1 changed files with 2 additions and 12 deletions

View File

@ -186,23 +186,13 @@ on_stop(InstId, #{poolname := PoolName}) ->
}),
emqx_plugin_libs_pool:stop_pool(PoolName).
on_query(InstId,
{Action, Collection, Filter, Projector},
AfterQuery,
#{poolname := PoolName} = State) ->
Request = {Action, Collection, Filter, Projector},
?TRACE("QUERY", "mongodb_connector_received",
#{request => Request, connector => InstId, state => State}),
case ecpool:pick_and_do(PoolName,
{?MODULE, mongo_query, [Action, Collection, Filter, Projector]},
no_handover) of
on_query(
InstId,
{Action, Collection, Filter, Projector},
AfterQuery,
#{poolname := PoolName} = State
) ->
Request = {Action, Collection, Selector, Projector},
Request = {Action, Collection, Filter, Projector},
?TRACE(
"QUERY",
"mongodb_connector_received",
@ -211,7 +201,7 @@ on_query(
case
ecpool:pick_and_do(
PoolName,
{?MODULE, mongo_query, [Action, Collection, Selector, Projector]},
{?MODULE, mongo_query, [Action, Collection, Filter, Projector]},
no_handover
)
of