diff --git a/app/Console/Commands/Elastic/RebuildElasticIndexes.php b/app/Console/Commands/Elastic/RebuildElasticIndexes.php index 83c1553568..07b0942026 100644 --- a/app/Console/Commands/Elastic/RebuildElasticIndexes.php +++ b/app/Console/Commands/Elastic/RebuildElasticIndexes.php @@ -335,12 +335,11 @@ class RebuildElasticIndexes extends Command $this->line(" Waiting for our {$expectedJobCount} jobs to complete..."); $this->line(" (Tracking: pending + processing jobs)", 'comment'); - $maxWaitSeconds = 600; $startTime = time(); $lastReportedDelta = -1; $stableCount = 0; - while ((time() - $startTime) < $maxWaitSeconds) { + while (true) { try { $currentJobCount = $this->getTotalActiveJobCount($connection, $queueName); $delta = $currentJobCount - $baselineJobCount; @@ -371,13 +370,6 @@ class RebuildElasticIndexes extends Command return; } } - - try { - $finalCount = $this->getTotalActiveJobCount($connection, $queueName); - $this->warn(" ⚠ Timeout after {$maxWaitSeconds}s (active: {$finalCount}, baseline: {$baselineJobCount})"); - } catch (\Exception $e) { - $this->warn(" ⚠ Timeout after {$maxWaitSeconds}s - continuing"); - } } protected function getTotalActiveJobCount(string $connection, string $queueName): int