mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Only hibernate the Taskmaster after 15 seconds of inactivity
Under some workloads, the taskmaster may hibernate and launch more rapidly than it should. Require 15 seconds of inactivity before hibernating. Also hibernate for longer. Auditors: chad
This commit is contained in:
parent
2cda280cde
commit
a41d158490
1 changed files with 5 additions and 2 deletions
|
@ -44,9 +44,12 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
|
|||
$sleep = 0;
|
||||
} else {
|
||||
|
||||
if ($this->shouldHibernate(60)) {
|
||||
if ($this->getIdleDuration() > 15) {
|
||||
$hibernate_duration = phutil_units('3 minutes in seconds');
|
||||
if ($this->shouldHibernate($hibernate_duration)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// When there's no work, sleep for one second. The pool will
|
||||
// autoscale down if we're continuously idle for an extended period
|
||||
|
|
Loading…
Reference in a new issue