From eb9efaf4606eece480d7af65cc9fdd73aa43c8d5 Mon Sep 17 00:00:00 2001 From: Anupam Kumar Date: Thu, 19 Dec 2024 18:40:22 +0530 Subject: [PATCH] reduce sleep time in indexer job (#88) Signed-off-by: Anupam Kumar --- lib/BackgroundJobs/IndexerJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/BackgroundJobs/IndexerJob.php b/lib/BackgroundJobs/IndexerJob.php index bdafe41..475738d 100644 --- a/lib/BackgroundJobs/IndexerJob.php +++ b/lib/BackgroundJobs/IndexerJob.php @@ -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;