ready()) { $this->warn('Reposição durável não instalada nesta composição.'); return self::FAILURE; } $limit = $this->option('limit') ?? config('replenishment.batch_size'); if (! filter_var($limit, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1, 'max_range' => 500]])) { $this->error('Limite entre 1 e 500.'); return self::INVALID; } $queue->discover(); $result = $queue->drain((int) $limit); $this->info('Reposição: '.$result['processed'].' trabalhos conferidos; '.$result['failed'].' a recuperar.'); return $result['failed'] === 0 ? self::SUCCESS : self::FAILURE; } }