Files
oficial/cli/src/Command/Queue/Pending.php
2025-07-15 22:18:45 -04:00

23 lines
649 B
PHP

<?php
namespace Incoviba\Command\Queue;
use Incoviba\Service;
use Symfony\Component\Console;
#[Console\Attribute\AsCommand(name: 'queue:pending', description: 'List pending jobs in queue')]
class Pending extends Console\Command\Command
{
public function __construct(protected Service\Job $jobService, ?string $name = null)
{
parent::__construct($name);
}
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
{
$jobCount = $this->jobService->getPending();
$output->writeln("Found {$jobCount} pending jobs");
return self::SUCCESS;
}
}