]> git.mxchange.org Git - friendica.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 13 May 2018 02:40:52 +0000 (04:40 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 14 May 2018 20:50:05 +0000 (22:50 +0200)
- 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

Signed-off-by: Roland Häder <roland@mxchange.org>
src/Core/Worker.php

index e3d8df45e40625eb2ce42b31d7328f6639f549f9..8c8e2733186b3530fc0074346bf798f219790e14 100644 (file)
@@ -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);