]> git.mxchange.org Git - friendica.git/commitdiff
Use "maxloadavg" when "worker_load_cooldown" is not defined
authorMichael <heluecht@pirati.ca>
Mon, 10 Oct 2022 06:01:07 +0000 (06:01 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 10 Oct 2022 06:01:07 +0000 (06:01 +0000)
src/Core/Worker.php

index 69ca6004ceb5d4ece347c20b677c6ed501bab226..a57792ce7cee881d92ebf75c60a8882ae491c3d2 100644 (file)
@@ -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;
                }