From c52a4e54e9f8cef3efd669b9c72186be1eeca5fe Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Fri, 25 Feb 2022 15:00:16 +0400 Subject: [PATCH] feat: set default values for resources as int --- app/executor.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/executor.php b/app/executor.php index d9be75dca7..ff313a513d 100644 --- a/app/executor.php +++ b/app/executor.php @@ -200,9 +200,9 @@ App::post('/v1/runtimes') ]); $vars = array_map(fn ($v) => strval($v), $vars); $orchestration - ->setCpus(App::getEnv('_APP_FUNCTIONS_CPUS', 1)) - ->setMemory(App::getEnv('_APP_FUNCTIONS_MEMORY', 256)) - ->setSwap(App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', 256)); + ->setCpus((int) App::getEnv('_APP_FUNCTIONS_CPUS', 0)) + ->setMemory((int) App::getEnv('_APP_FUNCTIONS_MEMORY', 0)) + ->setSwap((int) App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', 0)); /** Keep the container alive if we have commands to be executed */ $entrypoint = !empty($commands) ? [