feat(monitor): auto-prune expired maintenance windows
CI / test (pull_request) Successful in 2m33s
CI / lint (pull_request) Successful in 56s
CI / vulncheck (pull_request) Successful in 50s

Background goroutine runs every 15 minutes, deletes maintenance windows
that expired beyond the retention period (default 7 days). Configurable
via UPTOP_MAINT_RETENTION env var (Go duration format).

Closes #72
This commit was merged in pull request #96.
This commit is contained in:
2026-06-05 18:27:42 -04:00
parent 33dc84449b
commit 21a1563e53
9 changed files with 156 additions and 35 deletions
+1
View File
@@ -66,6 +66,7 @@ type Store interface {
AddMaintenanceWindow(mw models.MaintenanceWindow) error
EndMaintenanceWindow(id int) error
DeleteMaintenanceWindow(id int) error
PruneExpiredMaintenanceWindows(retention time.Duration) (int64, error)
IsMonitorInMaintenance(monitorID int) (bool, error)
// Preferences