fix: process domain

This commit is contained in:
Maël Gangloff
2024-08-10 23:29:31 +02:00
parent 56cfb1a81c
commit 9e4e35f9e8

View File

@@ -55,9 +55,10 @@ final readonly class ProcessWatchListTriggerHandler
) as $domain ) as $domain
) { ) {
$updatedAt = $domain->getUpdatedAt(); $updatedAt = $domain->getUpdatedAt();
$this->bus->dispatch(new ProcessDomainTrigger($watchList->getToken(), $domain->getLdhName(), $updatedAt));
try { try {
$domain = $this->RDAPService->registerDomain($domain->getLdhName()); $this->RDAPService->registerDomain($domain->getLdhName());
} catch (\Throwable $e) { } catch (\Throwable $e) {
$this->logger->error('An update error email is sent to user {username}.', [ $this->logger->error('An update error email is sent to user {username}.', [
'username' => $watchList->getUser()->getUserIdentifier(), 'username' => $watchList->getUser()->getUserIdentifier(),
@@ -65,8 +66,6 @@ final readonly class ProcessWatchListTriggerHandler
]); ]);
$this->sendEmailDomainUpdateError($domain, $watchList->getUser()); $this->sendEmailDomainUpdateError($domain, $watchList->getUser());
} }
$this->bus->dispatch(new ProcessDomainTrigger($watchList->getToken(), $domain->getLdhName(), $updatedAt));
} }
} }