mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
High disk usage notifications were sent every ~10 minutes on Coolify Cloud because the cache rate limiter did not hold across Sentinel-triggered checks. - Add a notification_throttles table and NotificationThrottle helper that atomically records when a notification was sent for a resource. - Add the ThrottledNotification contract; Team::notify() skips a throttled notification that was already sent within its interval. - High disk usage: configurable per-server interval (server_disk_usage_notification_interval_hours, default 24h) in Server > Advanced and the servers API. - Container restarted (coolify-proxy, database TCP proxy): at most one notification per hour per server/database during a restart loop. - Move the unreachable and missing-backup markers into the new table and migrate existing data (servers.unreachable_notification_sent and scheduled_database_backups.missing_backup_notification_sent_at). - Regenerate OpenAPI files.
20 lines
471 B
PHP
20 lines
471 B
PHP
<?php
|
|
|
|
namespace App\Contracts;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* A notification that is sent at most once per interval for the same resource.
|
|
* Team::notify() checks the throttle before it sends the notification.
|
|
*/
|
|
interface ThrottledNotification
|
|
{
|
|
/**
|
|
* The resource the throttle belongs to. Return null to send without a throttle.
|
|
*/
|
|
public function throttleSubject(): ?Model;
|
|
|
|
public function throttleIntervalMinutes(): int;
|
|
}
|