From fe1e7b92f2fa9ed2ef13661f22fd146131fe965d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Sun, 13 May 2018 04:40:52 +0200 Subject: [PATCH] Continued: - system,worker_dont_fork may not be set, always set default to "false" to have it properly set as Config::get() may one day behave differently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- src/Core/Worker.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index e3d8df45e4..8c8e273318 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -688,7 +688,7 @@ class Worker logger("Load: ".$load."/".$maxsysload." - processes: ".$active."/".$entries.$processlist." - maximum: ".$queues."/".$maxqueues, LOGGER_DEBUG); // Are there fewer workers running as possible? Then fork a new one. - if (!Config::get("system", "worker_dont_fork") && ($queues > ($active + 1)) && ($entries > 1)) { + if (!Config::get("system", "worker_dont_fork", false) && ($queues > ($active + 1)) && ($entries > 1)) { logger("Active workers: ".$active."/".$queues." Fork a new worker.", LOGGER_DEBUG); self::spawnWorker(); } @@ -1039,7 +1039,7 @@ class Worker } $priority = PRIORITY_MEDIUM; - $dont_fork = Config::get("system", "worker_dont_fork"); + $dont_fork = Config::get("system", "worker_dont_fork", false); $created = DateTimeFormat::utcNow(); $run_parameter = array_shift($args);