laravel[BatchRepository::class]->find($id = $this->argument('id')); if (! $batch) { $this->components->error("Unable to find a batch with ID [{$id}]."); return 1; } elseif (empty($batch->failedJobIds)) { $this->components->error('The given batch does not contain any failed jobs.'); return 1; } $this->components->info("Pushing failed queue jobs of the batch [$id] back onto the queue."); foreach ($batch->failedJobIds as $failedJobId) { $this->components->task($failedJobId, fn () => $this->callSilent('queue:retry', ['id' => $failedJobId]) == 0); } $this->newLine(); } }