mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-28 00:10:57 +01:00
Fix daemon restart behavior to check once every 10 seconds
Summary: This logic is flipped. Test Plan: - Before change: ran `bin/phd debug task`, saw queries to the config table every second. - After change: ran `bin/phd debug task`, saw queries to the config table every 10 seconds. Reviewers: chad, joshuaspence Reviewed By: chad, joshuaspence Differential Revision: https://secure.phabricator.com/D14542
This commit is contained in:
parent
39cf013472
commit
b964f8873b
1 changed files with 5 additions and 1 deletions
|
@ -17,7 +17,11 @@ final class PhabricatorDaemonOverseerModule
|
|||
}
|
||||
|
||||
public function shouldReloadDaemons() {
|
||||
if ($this->timestamp < PhabricatorTime::getNow() - 10) {
|
||||
$now = PhabricatorTime::getNow();
|
||||
$ago = ($now - $this->timestamp);
|
||||
|
||||
// Don't check more than once every 10 seconds.
|
||||
if ($ago < 10) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue