mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: begin transaction before update domain
This commit is contained in:
@@ -138,12 +138,13 @@ readonly class RDAPService
|
|||||||
$domain = $this->domainRepository->findOneBy(['ldhName' => $idnDomain]);
|
$domain = $this->domainRepository->findOneBy(['ldhName' => $idnDomain]);
|
||||||
|
|
||||||
$rdapData = $this->fetchRdapResponse($rdapServer, $idnDomain, $domain);
|
$rdapData = $this->fetchRdapResponse($rdapServer, $idnDomain, $domain);
|
||||||
|
$this->em->beginTransaction();
|
||||||
|
|
||||||
if (null === $domain) {
|
if (null === $domain) {
|
||||||
$domain = $this->initNewDomain($idnDomain, $tld);
|
$domain = $this->initNewDomain($idnDomain, $tld);
|
||||||
|
$this->em->persist($domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->em->beginTransaction();
|
|
||||||
$this->em->lock($domain, LockMode::PESSIMISTIC_WRITE);
|
$this->em->lock($domain, LockMode::PESSIMISTIC_WRITE);
|
||||||
|
|
||||||
$this->updateDomainStatus($domain, $rdapData);
|
$this->updateDomainStatus($domain, $rdapData);
|
||||||
|
|||||||
Reference in New Issue
Block a user