QFix: add limit to count queries (#7458)

Signed-off-by: Artem Savchenko <armisav@gmail.com>
This commit is contained in:
Artyom Savchenko
2024-12-14 00:34:46 +07:00
committed by GitHub
parent 5b1f0a6c35
commit a122f866e8
6 changed files with 26 additions and 10 deletions
@@ -71,9 +71,11 @@
task.class.Task,
{ kind: taskType._id },
(res) => {
tasksCounter = res.length
tasksCounter = res.total
},
{
total: true,
limit: 1,
projection: {
_id: 1
}