From 15fb312aa2038fd3660a1762f383b9e40c9b2702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Fri, 13 Dec 2024 19:45:45 +0100 Subject: [PATCH] fix: reduce database requests when register domain --- src/Service/RDAPService.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index a2390bb..b22b7ed 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -189,7 +189,6 @@ readonly class RDAPService if (count($addedStatus) > 0 || count($deletedStatus) > 0) { $this->em->persist($domain); - $this->em->flush(); if ($domain->getUpdatedAt() !== $domain->getCreatedAt()) { $this->em->persist((new DomainStatus()) @@ -214,7 +213,6 @@ readonly class RDAPService } $this->em->persist($domain); - $this->em->flush(); /** @var DomainEvent $event */ foreach ($domain->getEvents()->getIterator() as $event) { @@ -243,7 +241,6 @@ readonly class RDAPService ); $this->em->persist($domain); - $this->em->flush(); } } @@ -295,7 +292,6 @@ readonly class RDAPService ); $this->em->persist($domainEntity); - $this->em->flush(); } } @@ -431,7 +427,6 @@ readonly class RDAPService } $this->em->persist($entity); - $this->em->flush(); foreach ($rdapEntity['events'] as $rdapEntityEvent) { $eventAction = $rdapEntityEvent['eventAction'];