mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
functions api
This commit is contained in:
1 parent
6c6f7fb3bb
commit
73a19614e1
2 files changed
+2
-6
No files matched your search
@@ -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