diff --git a/.env b/.env index 79a216c72f..36765f728d 100644 --- a/.env +++ b/.env @@ -68,6 +68,8 @@ _APP_STORAGE_PREVIEW_LIMIT=20000000 _APP_FUNCTIONS_SIZE_LIMIT=30000000 _APP_FUNCTIONS_TIMEOUT=900 _APP_FUNCTIONS_BUILD_TIMEOUT=900 +_APP_FUNCTIONS_CPUS=1 +_APP_FUNCTIONS_MEMORY=512 _APP_MAINTENANCE_INTERVAL=86400 _APP_MAINTENANCE_RETENTION_CACHE=2592000 _APP_MAINTENANCE_RETENTION_EXECUTION=1209600 @@ -81,15 +83,8 @@ _APP_LOGGING_CONFIG= _APP_EXECUTOR_SECRET=your-secret-key _APP_EXECUTOR_HOST=http://proxy1/v1 _APP_FUNCTIONS_RUNTIMES= - OPR_EXECUTOR_CONNECTION_STORAGE=file://localhost OPR_EXECUTOR_INACTIVE_TRESHOLD=600 OPR_EXECUTOR_NETWORK=openruntimes-runtimes OPR_EXECUTOR_DOCKER_HUB_USERNAME= -OPR_EXECUTOR_DOCKER_HUB_PASSWORD= - -OPR_PROXY_ALGORITHM=round-robin -OPR_PROXY_EXECUTORS=exc1,exc2 -OPR_PROXY_HEALTHCHECK=enabled -OPR_PROXY_HEALTHCHECK_INTERVAL=5000 -OPR_PROXY_EXECUTOR_SECRET=your-secret-key \ No newline at end of file +OPR_EXECUTOR_DOCKER_HUB_PASSWORD= \ No newline at end of file diff --git a/composer.lock b/composer.lock index 7f0bcd7fdb..af264e7b30 100644 --- a/composer.lock +++ b/composer.lock @@ -300,16 +300,16 @@ }, { "name": "colinmollenhour/credis", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/colinmollenhour/credis.git", - "reference": "85df015088e00daf8ce395189de22c8eb45c8d49" + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/85df015088e00daf8ce395189de22c8eb45c8d49", - "reference": "85df015088e00daf8ce395189de22c8eb45c8d49", + "url": "https://api.github.com/repos/colinmollenhour/credis/zipball/dccc8a46586475075fbb012d8bd523b8a938c2dc", + "reference": "dccc8a46586475075fbb012d8bd523b8a938c2dc", "shasum": "" }, "require": { @@ -341,9 +341,9 @@ "homepage": "https://github.com/colinmollenhour/credis", "support": { "issues": "https://github.com/colinmollenhour/credis/issues", - "source": "https://github.com/colinmollenhour/credis/tree/v1.13.1" + "source": "https://github.com/colinmollenhour/credis/tree/v1.14.0" }, - "time": "2022-06-20T22:56:59+00:00" + "time": "2022-11-09T01:18:39+00:00" }, { "name": "dragonmantank/cron-expression", diff --git a/src/Executor/Executor.php b/src/Executor/Executor.php index 8f4113b07d..b87b208e0a 100644 --- a/src/Executor/Executor.php +++ b/src/Executor/Executor.php @@ -26,16 +26,19 @@ class Executor 'content-type' => '', ]; - protected int $cpus = 2; + protected int $cpus; - protected int $memory = 512; + protected int $memory; public function __construct(string $endpoint) { if (!filter_var($endpoint, FILTER_VALIDATE_URL)) { throw new Exception('Unsupported endpoint'); } + $this->endpoint = $endpoint; + $this->cpus = \intval(App::getEnv('_APP_FUNCTIONS_CPUS', '1')); + $this->memory = intval(App::getEnv('_APP_FUNCTIONS_MEMORY', '512')); } /**