addOption('full', 'f', Console\Input\InputOption::VALUE_NONE, 'Full output'); } protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int { $jobs = $this->jobService->getPending(); $jobCount = count($jobs); $output->writeln("Found {$jobCount} pending jobs"); if ($input->getOption('full') and $jobCount > 0) { $io = new Console\Style\SymfonyStyle($input, $output); $rows = []; foreach ($jobs as $job) { $retries = $job['retries'] ?? 0; $updated = $job['updated_at'] ?? ''; $rows[] = [ $job['id'], $job['created_at'], $job['configuration']['type'], $retries, $updated ]; } $io->table(['ID', 'Created', 'Type', 'Retries', 'Updated'], $rows); } return self::SUCCESS; } }