Cambio en queue para que no quede pegado esperando respuesta en cli.
Chequeo de servicios externos para agregar elementos pendientes.
This commit is contained in:
22
cli/src/Command/ExternalServices.php
Normal file
22
cli/src/Command/ExternalServices.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace Incoviba\Command;
|
||||
|
||||
use Symfony\Component\Console;
|
||||
use Incoviba\Common\Alias;
|
||||
|
||||
#[Console\Attribute\AsCommand(
|
||||
name: 'external:services',
|
||||
description: 'Check external services',
|
||||
)]
|
||||
class ExternalServices extends Alias\Command
|
||||
{
|
||||
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
|
||||
{
|
||||
$url = '/api/external/services/check';
|
||||
$output->writeln("GET {$url}");
|
||||
$response = $this->client->get($url);
|
||||
$output->writeln("Response Code: {$response->getStatusCode()}");
|
||||
|
||||
return Console\Command\Command::SUCCESS;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user