Optimized connection to db
This commit is contained in:
@ -8,6 +8,7 @@ use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use ProVM\Service\Remote;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
#[AsCommand(
|
||||
name: 'update',
|
||||
@ -22,8 +23,13 @@ class UpdateIp extends Command
|
||||
|
||||
public function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
$io->title('Update IP');
|
||||
|
||||
try {
|
||||
$io->info('Obtaining IP and updating database');
|
||||
$this->service->update();
|
||||
$io->info('Done');
|
||||
return Command::SUCCESS;
|
||||
} catch (PDOException $e) {
|
||||
$this->logger->warning($e);
|
||||
|
Reference in New Issue
Block a user