skip variables subquery

This commit is contained in:
fogelito 2025-12-29 10:20:32 +02:00
parent a0514d2aac
commit 774e3af61c

View file

@ -122,14 +122,15 @@ class Functions extends Action
$log->addTag('type', $type);
if (!empty($events)) {
$limit = 30;
$sum = 30;
$limit = 100;
$sum = 100;
$offset = 0;
while ($sum >= $limit) {
$functions = $dbForProject->find('functions', [
Query::select(['$id', 'events']), // Skip variables subqueries
Query::limit($limit),
Query::offset($offset),
Query::orderAsc('name'),
Query::orderAsc('$sequence'),
]);
$sum = \count($functions);
@ -147,6 +148,11 @@ class Functions extends Action
continue;
}
/**
* get variables subqueries cached
*/
$function = $dbForProject->getDocument('functions', $function->getId());
Console::success('Iterating function: ' . $function->getAttribute('name'));
$this->execute(