mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: reduce database requests when register domain
This commit is contained in:
@@ -189,7 +189,6 @@ readonly class RDAPService
|
|||||||
|
|
||||||
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
if (count($addedStatus) > 0 || count($deletedStatus) > 0) {
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
$this->em->flush();
|
|
||||||
|
|
||||||
if ($domain->getUpdatedAt() !== $domain->getCreatedAt()) {
|
if ($domain->getUpdatedAt() !== $domain->getCreatedAt()) {
|
||||||
$this->em->persist((new DomainStatus())
|
$this->em->persist((new DomainStatus())
|
||||||
@@ -214,7 +213,6 @@ readonly class RDAPService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
$this->em->flush();
|
|
||||||
|
|
||||||
/** @var DomainEvent $event */
|
/** @var DomainEvent $event */
|
||||||
foreach ($domain->getEvents()->getIterator() as $event) {
|
foreach ($domain->getEvents()->getIterator() as $event) {
|
||||||
@@ -243,7 +241,6 @@ readonly class RDAPService
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->em->persist($domain);
|
$this->em->persist($domain);
|
||||||
$this->em->flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +292,6 @@ readonly class RDAPService
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->em->persist($domainEntity);
|
$this->em->persist($domainEntity);
|
||||||
$this->em->flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -431,7 +427,6 @@ readonly class RDAPService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->em->persist($entity);
|
$this->em->persist($entity);
|
||||||
$this->em->flush();
|
|
||||||
|
|
||||||
foreach ($rdapEntity['events'] as $rdapEntityEvent) {
|
foreach ($rdapEntity['events'] as $rdapEntityEvent) {
|
||||||
$eventAction = $rdapEntityEvent['eventAction'];
|
$eventAction = $rdapEntityEvent['eventAction'];
|
||||||
|
|||||||
Reference in New Issue
Block a user