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:
parent
a34cb4bb12
commit
9630123d6a
1 changed files with 3 additions and 8 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue