mirror of
https://github.com/friendica/friendica
synced 2024-11-18 15:43:42 +00:00
Use "maxloadavg" when "worker_load_cooldown" is not defined
This commit is contained in:
parent
a10f55bb85
commit
a21c04d55d
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue