feat(monitor): save state changes for group monitors #158

Merged
lerko merged 2 commits from feat/group-state-history into main 2026-06-28 15:20:30 +00:00
Showing only changes of commit ab1194f74d - Show all commits
+4 -2
View File
@@ -283,8 +283,6 @@ func (e *Engine) Start(ctx context.Context) {
default:
}
e.refreshMaintenanceCache(ctx)
configs, err := e.db.GetSites(ctx)
if err != nil {
e.AddLog(fmt.Sprintf("Failed to load sites: %v", err))
@@ -327,6 +325,10 @@ func (e *Engine) Start(ctx context.Context) {
}
}
// Refresh after sites load so the cache covers newly added sites.
// On first iteration liveState was empty before the loop above.
e.refreshMaintenanceCache(ctx)
e.mu.RLock()
var vanished []int
for id := range e.liveState {