Consolidar command

This commit is contained in:
2022-03-25 15:04:10 -03:00
parent dbad283e14
commit ee3133da72
5 changed files with 33 additions and 13 deletions

View File

@ -22,16 +22,16 @@ class Consolidar extends Command {
}
public function execute(InputInterface $input, OutputInterface $output) {
error_log('Starting Consolidar');
try {
$response = $this->getClient()->get('/consolidar');
if ($response->getStatusCode() === 200) {
return 0;
return Command::SUCCESS;
}
return $response->getStatusCode();
error_log($response->getReasonPhrase());
return Command::FAILURE;
} catch (\Exception $e) {
error_log($e);
return $e->getCode();
return Command::FAILURE;
}
}
}