mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 18:15:24 +00:00
Revert "feat(notifications): deduplicate repeated email alerts"
This reverts commit 8c1405e168.
This commit is contained in:
1 parent
8c1405e168
commit
2a0183bfad
33 files changed
+14
-516
No files matched your search
@@ -21,16 +21,6 @@ class DockerCleanupFailed extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('docker_cleanup_failure');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "docker-cleanup-failed:server:{$this->server->uuid}:message:".hash('sha256', $this->message);
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 21600;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -21,16 +21,6 @@ class DockerCleanupSuccess extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('docker_cleanup_success');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "docker-cleanup-success:server:{$this->server->uuid}:message:".hash('sha256', $this->message);
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 21600;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -21,16 +21,6 @@ class ForceDisabled extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_force_disabled');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "server-force-disabled:{$this->server->uuid}";
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 86400;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -21,16 +21,6 @@ class ForceEnabled extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_force_enabled');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "server-force-enabled:{$this->server->uuid}";
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 86400;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -21,16 +21,6 @@ class HetznerDeletionFailed extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('hetzner_deletion_failed');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "hetzner-deletion-failed:{$this->hetznerServerId}:error:".hash('sha256', $this->errorMessage);
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 86400;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -21,16 +21,6 @@ class HighDiskUsage extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_disk_usage');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "high-disk-usage:server:{$this->server->uuid}:threshold:{$this->server_disk_usage_notification_threshold}";
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 21600;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -30,16 +30,6 @@ class Reachable extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_reachable');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "server-reachable:{$this->server->uuid}";
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 1800;
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -24,16 +24,6 @@ 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;
|
||||
|
||||
@@ -38,18 +38,6 @@ class TraefikVersionOutdated extends CustomEmailNotification
|
||||
return $this->formatVersion($info['latest'] ?? 'unknown');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
$serverUuids = $this->servers->pluck('uuid')->sort()->values()->join('|');
|
||||
|
||||
return 'traefik-version-outdated:servers:'.hash('sha256', $serverUuids);
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 86400;
|
||||
}
|
||||
|
||||
public function toMail($notifiable = null): MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
@@ -30,16 +30,6 @@ class Unreachable extends CustomEmailNotification
|
||||
return $notifiable->getEnabledChannels('server_unreachable');
|
||||
}
|
||||
|
||||
public function deduplicationKey(object $notifiable, string $channel): ?string
|
||||
{
|
||||
return "server-unreachable:{$this->server->uuid}";
|
||||
}
|
||||
|
||||
public function deduplicateFor(): int
|
||||
{
|
||||
return 3600;
|
||||
}
|
||||
|
||||
public function toMail(): ?MailMessage
|
||||
{
|
||||
$mail = new MailMessage;
|
||||
|
||||
Reference in new issue
Block a user