Merge pull request #11980 from annando/cooldown
Use "maxloadavg" when "worker_load_cooldown" is not defined
This commit is contained in:
commit
c8406f6cd0
|
@ -461,6 +461,10 @@ class Worker
|
||||||
$load_cooldown = DI::config()->get('system', 'worker_load_cooldown');
|
$load_cooldown = DI::config()->get('system', 'worker_load_cooldown');
|
||||||
$processes_cooldown = DI::config()->get('system', 'worker_processes_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)) {
|
if (($load_cooldown == 0) && ($processes_cooldown == 0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -501,6 +505,10 @@ class Worker
|
||||||
$load_cooldown = DI::config()->get('system', 'worker_load_cooldown');
|
$load_cooldown = DI::config()->get('system', 'worker_load_cooldown');
|
||||||
$processes_cooldown = DI::config()->get('system', 'worker_processes_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)) {
|
if (($load_cooldown == 0) && ($processes_cooldown == 0)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user