Opcion de enviar update a los servicios externos
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
return [
|
||||
'commands' => function() {
|
||||
return [
|
||||
'loop' => Incoviba\Command\BaseLoop::class,
|
||||
'comunas' => Incoviba\Command\Comunas::class,
|
||||
'contabilidad:cartolas:update' => Incoviba\Command\Contabilidad\Cartolas\Update::class,
|
||||
'money:ipc' => Incoviba\Command\Money\IPC::class,
|
||||
@ -14,8 +15,7 @@ return [
|
||||
'ventas:cuotas:pendientes' => Incoviba\Command\Ventas\Cuotas\Pendientes::class,
|
||||
'ventas:cuotas:vencer' => Incoviba\Command\Ventas\Cuotas\PorVencer::class,
|
||||
'queue' => Incoviba\Command\Queue::class,
|
||||
'loop' => Incoviba\Command\BaseLoop::class,
|
||||
'external:services' => Incoviba\Command\ExternalServices::class
|
||||
'external:services' => Incoviba\Command\ExternalServices::class,
|
||||
];
|
||||
}
|
||||
];
|
||||
|
@ -10,9 +10,21 @@ use Incoviba\Common\Alias;
|
||||
)]
|
||||
class ExternalServices extends Alias\Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->addOption('update', 'u', Console\Input\InputOption::VALUE_NONE, 'Update');
|
||||
}
|
||||
|
||||
public function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output): int
|
||||
{
|
||||
$update = $input->getOption('update');
|
||||
|
||||
$url = '/api/external/services/check';
|
||||
|
||||
if ($update) {
|
||||
$url = '/api/external/services/update';
|
||||
}
|
||||
|
||||
$output->writeln("GET {$url}");
|
||||
$response = $this->client->get($url);
|
||||
$output->writeln("Response Code: {$response->getStatusCode()}");
|
||||
|
Reference in New Issue
Block a user