Optimized connection to db

This commit is contained in:
2023-06-18 19:20:06 -04:00
parent 781858a905
commit 8d8eb84e20
13 changed files with 128 additions and 39 deletions

View File

@ -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);