feat: add only-new command option

This commit is contained in:
Maël Gangloff
2025-11-01 13:59:52 +01:00
parent ff5a2d7d67
commit ccfd7e0e89
3 changed files with 15 additions and 2 deletions

View File

@@ -69,6 +69,14 @@ final readonly class UpdateDomainHandler
{
$domain = $this->domainRepository->findOneBy(['ldhName' => $message->ldhName]);
if (null !== $domain && $message->onlyNew) {
$this->logger->debug('The domain name is already present in the database', [
'ldhName' => $domain->getLdhName(),
]);
return;
}
if (null === $domain) {
$this->RDAPService->registerDomain($message->ldhName);