mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: start of InfluxDB implementation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user