Add ability to disable minIdleWorkers

This commit is contained in:
Matej Bačo
2024-02-19 14:52:39 +00:00
parent 8619f26628
commit d9ff799664
+1 -1
View File
@@ -59,7 +59,7 @@ App::get('/v1/health/version')
$idleWorkers = $stats['idle_worker_num'] ?? 0;
$minIdleWorkers = \intval(App::getEnv('_APP_HEALTHCHECK_MIN_IDLE_WORKERS', '2'));
if ($idleWorkers < $minIdleWorkers) {
if ($minIdleWorkers !== 0 && $idleWorkers < $minIdleWorkers) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Can not process more requests at the moment.');
}