Consolidar command
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user