Skip to content

Commit

Permalink
reduce sleep time in indexer job (#88)
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky authored Dec 19, 2024
1 parent febfbcb commit eb9efaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/BackgroundJobs/IndexerJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ protected function getMaxIndexingTime(): int {

protected function hasEnoughRunningJobs(): bool {
// Sleep a bit randomly to avoid a scenario where all jobs are started at the same time and kill themselves directly
sleep(rand(1, 3 * 60));
sleep(rand(1, 30));
if (!$this->jobList->hasReservedJob(static::class)) {
// short circuit to false if no jobs are running, yet
return false;
Expand Down

0 comments on commit eb9efaf

Please sign in to comment.