Fix executor missing runtime
This commit is contained in:
parent
084c50fc97
commit
5f87ef3074
3 changed files with 5 additions and 5 deletions
|
@ -1402,7 +1402,7 @@ App::post('/v1/functions/:functionId/executions')
|
|||
/** Execute function */
|
||||
$executor = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
|
||||
try {
|
||||
$command = 'npm start';
|
||||
$command = 'npm start'; // TODO: Custom for each runtime
|
||||
$executionResponse = $executor->createExecution(
|
||||
projectId: $project->getId(),
|
||||
deploymentId: $deployment->getId(),
|
||||
|
@ -1416,7 +1416,7 @@ App::post('/v1/functions/:functionId/executions')
|
|||
path: $path,
|
||||
method: $method,
|
||||
headers: $headers,
|
||||
commands: [
|
||||
startCommands: [
|
||||
'sh', '-c',
|
||||
'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &'
|
||||
]
|
||||
|
|
|
@ -276,7 +276,7 @@ class BuildsV1 extends Worker
|
|||
entrypoint: $deployment->getAttribute('entrypoint'),
|
||||
destination: APP_STORAGE_BUILDS . "/app-{$project->getId()}",
|
||||
variables: $vars,
|
||||
commands: [
|
||||
startCommands: [
|
||||
'sh', '-c',
|
||||
'tar -zxf /tmp/code.tar.gz -C /mnt/code && helpers/build.sh "' . $command . '"'
|
||||
],
|
||||
|
|
|
@ -167,7 +167,7 @@ Server::setResource('execute', function () {
|
|||
|
||||
/** Execute function */
|
||||
try {
|
||||
$command = 'npm start';
|
||||
$command = 'npm start'; // TODO: Custom for each runtime
|
||||
$client = new Executor(App::getEnv('_APP_EXECUTOR_HOST'));
|
||||
$executionResponse = $client->createExecution(
|
||||
projectId: $project->getId(),
|
||||
|
@ -182,7 +182,7 @@ Server::setResource('execute', function () {
|
|||
path: $path,
|
||||
method: $method,
|
||||
headers: $headers,
|
||||
commands: [
|
||||
startCommands: [
|
||||
'sh', '-c',
|
||||
'cp /tmp/code.tar.gz /mnt/code/code.tar.gz && nohup helpers/start.sh "' . $command . '" &>/dev/null &'
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue