mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
skip variables subquery
This commit is contained in:
parent
a0514d2aac
commit
774e3af61c
1 changed files with 9 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue