mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
functions api
This commit is contained in:
@@ -945,9 +945,7 @@ App::post('/v1/functions/:functionId/executions')
|
||||
$execution->setAttribute('stderr', $executionResponse['stderr']);
|
||||
$execution->setAttribute('time', $executionResponse['time']);
|
||||
} catch (\Throwable $th) {
|
||||
$created = new DateTime($execution->getCreatedAt());
|
||||
$now = Database::getCurrentDateTimeObject();
|
||||
$interval = $now->diff($created);
|
||||
$interval = (new DateTime())->diff(new DateTime($execution->getCreatedAt()));
|
||||
$execution
|
||||
->setAttribute('time', (float)$interval->format('%s.%f'))
|
||||
->setAttribute('status', 'failed')
|
||||
|
||||
@@ -296,9 +296,7 @@ class FunctionsV1 extends Worker
|
||||
->setAttribute('stderr', $executionResponse['stderr'])
|
||||
->setAttribute('time', $executionResponse['time']);
|
||||
} catch (\Throwable $th) {
|
||||
$created = new DateTime($execution->getCreatedAt());
|
||||
$now = Database::getCurrentDateTimeObject();
|
||||
$interval = $now->diff($created);
|
||||
$interval = (new DateTime())->diff(new DateTime($execution->getCreatedAt()));
|
||||
$execution
|
||||
->setAttribute('time', (float)$interval->format('%s.%f'))
|
||||
->setAttribute('status', 'failed')
|
||||
|
||||
Reference in New Issue
Block a user