From d2ffa3e7c6090a65e1a81d5838fca1d423d875ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 14 Feb 2023 11:35:49 +0000 Subject: [PATCH] Fix cold-start bug --- app/controllers/api/functions.php | 2 +- app/workers/functions.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index cdd1acf1dd..8952aaf517 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1216,7 +1216,7 @@ App::post('/v1/functions/:functionId/executions') variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $build->getAttribute('path', ''), + source: $deployment->getAttribute('path', ''), entrypoint: $deployment->getAttribute('entrypoint', ''), path: $path, method: $method, diff --git a/app/workers/functions.php b/app/workers/functions.php index b4d94ade9d..f496fe36b6 100644 --- a/app/workers/functions.php +++ b/app/workers/functions.php @@ -130,7 +130,6 @@ Server::setResource('execute', function () { /** Execute function */ try { - \var_dump($build->getAttribute('path', '')); $client = new Executor(App::getEnv('_APP_EXECUTOR_HOST')); $executionResponse = $client->createExecution( projectId: $project->getId(), @@ -140,7 +139,7 @@ Server::setResource('execute', function () { variables: $vars, timeout: $function->getAttribute('timeout', 0), image: $runtime['image'], - source: $build->getAttribute('path', ''), + source: $deployment->getAttribute('path', ''), entrypoint: $deployment->getAttribute('entrypoint', ''), path: $path, method: $method,