Files
oficial/cli/src/Command/Queue/Pending.php

23 lines
649 B
PHP
Raw Normal View History

2025-06-30 15:52:28 -04:00
<?php
2025-07-15 22:18:45 -04:00
namespace Incoviba\Command\Queue;
2025-06-30 15:52:28 -04:00
use Incoviba\Service;
2025-07-15 22:18:45 -04:00
use Symfony\Component\Console;
2025-06-30 15:52:28 -04:00
2025-07-15 22:18:45 -04:00
#[Console\Attribute\AsCommand(name: 'queue:pending', description: 'List pending jobs in queue')]
2025-06-30 15:52:28 -04:00
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
{
2025-07-15 19:04:19 -04:00
$jobCount = $this->jobService->getPending();
2025-06-30 15:52:28 -04:00
$output->writeln("Found {$jobCount} pending jobs");
return self::SUCCESS;
}
}