From a21c04d55ddc9144bfeac33a3e5540eee1cc70ab Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 10 Oct 2022 06:01:07 +0000 Subject: [PATCH] Use "maxloadavg" when "worker_load_cooldown" is not defined --- src/Core/Worker.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 69ca6004c..a57792ce7 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -461,6 +461,10 @@ class Worker $load_cooldown = DI::config()->get('system', 'worker_load_cooldown'); $processes_cooldown = DI::config()->get('system', 'worker_processes_cooldown'); + if ($load_cooldown == 0) { + $load_cooldown = DI::config()->get('system', 'maxloadavg'); + } + if (($load_cooldown == 0) && ($processes_cooldown == 0)) { return false; } @@ -501,6 +505,10 @@ class Worker $load_cooldown = DI::config()->get('system', 'worker_load_cooldown'); $processes_cooldown = DI::config()->get('system', 'worker_processes_cooldown'); + if ($load_cooldown == 0) { + $load_cooldown = DI::config()->get('system', 'maxloadavg'); + } + if (($load_cooldown == 0) && ($processes_cooldown == 0)) { return; }