feat: start of InfluxDB implementation

This commit is contained in:
Maël Gangloff
2024-12-08 00:52:03 +01:00
parent 1e8f9bcd08
commit c7569b9081
8 changed files with 537 additions and 7 deletions

View File

@@ -87,6 +87,8 @@ readonly class RDAPService
private EntityManagerInterface $em,
private LoggerInterface $logger,
private StatService $statService,
private InfluxdbService $influxService,
private bool $influxdbEnable = false,
) {
}
@@ -156,6 +158,10 @@ readonly class RDAPService
$this->em->flush();
}
if ($this->influxdbEnable) {
$this->influxService->addRdapRequest($rdapServer, $domain, false);
}
throw new NotFoundHttpException('The domain name is not present in the WHOIS database.');
}
@@ -348,6 +354,10 @@ readonly class RDAPService
$this->em->persist($domain);
$this->em->flush();
if ($this->influxdbEnable) {
$this->influxService->addRdapRequest($rdapServer, $domain, true);
}
return $domain;
}