feat: improve executor
This commit is contained in:
parent
cef5264c48
commit
259fcc821e
1 changed files with 84 additions and 87 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue