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

29 lines
841 B
PHP
Raw Normal View History

<?php
namespace Incoviba\Command;
2025-05-13 15:49:41 -04:00
use DateTimeImmutable;
use Symfony\Component\Console;
use Incoviba\Common\Alias\Command;
#[Console\Attribute\AsCommand(
name: 'queue',
description: 'Run queue'
)]
class Queue extends Command
{
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
{
$this->logger->debug("Running {$this->getName()}");
$io = new Console\Style\SymfonyStyle($input, $output);
2025-05-13 15:40:32 -04:00
$now = new DateTimeImmutable();
$io->title("[{$now->format('Y-m-d H:i:s e')}] Running Queue...");
$uri = '/api/queue/run';
$output->writeln("GET {$uri}");
$response = $this->client->get($uri);
$output->writeln("Response Code: {$response->getStatusCode()}");
return Console\Command\Command::SUCCESS;
}
}