diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index af9fa45bde..80c3fe94af 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1349,9 +1349,9 @@ App::post('/v1/functions/:functionId/executions') path: $path, method: $method, headers: $headers, - startCommands: [ + commands: [ 'sh', '-c', - 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && helpers/start.sh "' . $command . '"' + 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &' ] ); diff --git a/app/workers/functions.php b/app/workers/functions.php index b796bcf3b9..df1ffa1ca1 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -182,9 +182,9 @@ Server::setResource('execute', function () { path: $path, method: $method, headers: $headers, - startCommands: [ + commands: [ 'sh', '-c', - 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && helpers/start.sh "' . $command . '"' + 'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &' ] );