mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 16:15:17 +00:00
feat(notifications): deduplicate repeated email alerts
Add notification-level deduplication keys and TTLs for deployment, backup, server, container, scheduled task, SSL, token, and transactional emails. Apply deduplication in email channels before sending rendered messages.
This commit is contained in:
1 parent
ee620a5413
commit
8c1405e168
33 files changed
+516
-14
No files matched your search
@@ -24,6 +24,16 @@ class ServerPatchCheck extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_patch');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "server-patch-check:server:{$this->server->uuid}:state:".hash('sha256', json_encode($this->patchData));
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 86400;
|
||||
}
|
||||
|
||||
public function toMail($notifiable = null): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
Reference in new issue
Block a user