1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Use pull-frequency to determine pull frequency, not some sort of random

algorithm that backs off to 15m which is crazy.
This commit is contained in:
epriestley 2011-04-06 19:35:35 -07:00
parent a34cb4bb12
commit 9630123d6a

View file

@ -29,15 +29,10 @@ abstract class PhabricatorRepositoryCommitDiscoveryDaemon
final public function run() {
$this->repository = $this->loadRepository();
$sleep = 15;
$sleep = $this->repository->getDetail('pull-frequency');
while (true) {
$found = $this->discoverCommits();
if ($found) {
$sleep = 15;
} else {
$sleep = min($sleep + 15, 60 * 15);
}
$this->sleep($sleep);
$this->discoverCommits();
$this->sleep(max(2, $sleep));
}
}