Files
kupshop/bundles/External/ZNZBundle/Command/ZNZConsumeCommand.php
2025-08-02 16:30:27 +02:00

28 lines
619 B
PHP

<?php
declare(strict_types=1);
namespace External\ZNZBundle\Command;
use External\ZNZBundle\Util\ZNZWorker;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ZNZConsumeCommand extends Command
{
protected static $defaultName = 'znz:consume';
/** @required */
public ZNZWorker $worker;
protected function execute(InputInterface $input, OutputInterface $output): int
{
do {
$more = $this->worker->consumeChanges();
} while ($more);
return 0;
}
}