feat: remove unused orderBy, skip executing recursive functions
This commit is contained in:
parent
2ee7a3a356
commit
23e6c1adf6
2 changed files with 11 additions and 4 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 3a0c8f0334d402a6e27c8b5c0512f3d60080ddbd
|
||||
Subproject commit 9174d8f8cb584744dd7a53f69d324f490ee82ee3
|
|
@ -265,8 +265,7 @@ $server->job()
|
|||
while ($sum >= $limit) {
|
||||
$functions = $dbForProject->find('functions', [
|
||||
Query::limit($limit),
|
||||
Query::offset($offset),
|
||||
Query::orderAsc('name'),
|
||||
Query::offset($offset)
|
||||
]);
|
||||
|
||||
$sum = \count($functions);
|
||||
|
@ -278,7 +277,15 @@ $server->job()
|
|||
if (!array_intersect($events, $function->getAttribute('events', []))) {
|
||||
continue;
|
||||
}
|
||||
Console::success('Iterating function: ' . $function->getAttribute('name'));
|
||||
|
||||
/** Skip if a function has been triggered by its own execution */
|
||||
$event = "functions.{$function->getId()}.executions.*";
|
||||
if(in_array($event, $events)) {
|
||||
Console::warning("Skipping function: {$function->getAttribute('name')} from project: {$project->getId()} triggered by self");
|
||||
continue;
|
||||
}
|
||||
|
||||
Console::success("Iterating function: {$function->getAttribute('name')} from project: {$project->getId()}");
|
||||
$execute(
|
||||
log: $log,
|
||||
statsd: $statsd,
|
||||
|
|
Loading…
Reference in a new issue