1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

feat: improve executor

This commit is contained in:
Christy Jacob 2022-02-16 15:52:54 +04:00
parent cef5264c48
commit 259fcc821e

View file

@ -489,6 +489,7 @@ App::post('/v1/execution')
Console::info('Executing Runtime: ' . $runtimeId);
$execution = [];
$executionStart = \microtime(true);
$stdout = '';
$stderr = '';
@ -496,7 +497,6 @@ App::post('/v1/execution')
$errNo = -1;
$executorResponse = '';
try {
$ch = \curl_init();
$body = \json_encode([
'path' => '/usr/code',
@ -582,9 +582,6 @@ App::post('/v1/execution')
/** Update swoole table */
$runtime['updated'] = \time();
$activeRuntimes->set($container, $runtime);
} catch (\Throwable $th) {
Console::error('Runtime execution failed: ' . $th->getMessage());
}
$response
->setStatusCode(Response::STATUS_CODE_OK)