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