1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +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:
epriestley 2015-11-22 15:07:57 -08:00
parent 39cf013472
commit b964f8873b

View file

@ -17,7 +17,11 @@ final class PhabricatorDaemonOverseerModule
} }
public function shouldReloadDaemons() { 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; return false;
} }