1
0
Fork 0
mirror of synced 2024-05-20 04:32:37 +12:00

Improve performance

This commit is contained in:
Matej Bačo 2022-11-21 11:43:20 +00:00
parent 831960245f
commit d2362aeab0

View file

@ -1080,7 +1080,7 @@ App::post('/v1/functions/:functionId/executions')
'functionId' => $function->getId(),
'deploymentId' => $deployment->getId(),
'trigger' => 'http', // http / schedule / event
'status' => 'waiting', // waiting / processing / completed / failed
'status' => $async ? 'waiting' : 'processing', // waiting / processing / completed / failed
'statusCode' => 0,
'response' => '',
'stderr' => '',
@ -1132,9 +1132,6 @@ App::post('/v1/functions/:functionId/executions')
->dynamic($execution, Response::MODEL_EXECUTION);
}
$execution->setAttribute('status', 'processing');
Authorization::skip(fn () => $dbForProject->updateDocument('executions', $executionId, $execution));
$vars = array_reduce($function['vars'] ?? [], function (array $carry, Document $var) {
$carry[$var->getAttribute('key')] = $var->getAttribute('value') ?? '';
return $carry;