1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-15 18:10:53 +01:00

(stable) 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:
epriestley 2017-03-25 05:01:32 -07:00
parent b2c029cbad
commit 8f7983a5be

View file

@ -44,8 +44,11 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon {
$sleep = 0; $sleep = 0;
} else { } else {
if ($this->shouldHibernate(60)) { if ($this->getIdleDuration() > 15) {
break; $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 // When there's no work, sleep for one second. The pool will