aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-04 14:22:20 +0100
committerRasmus Dahlberg <rgdd@glasklarteknik.se>2025-01-04 14:22:20 +0100
commitb6bf2fdfd6fb9f4a2894c2a4dbfad3a82b75fdea (patch)
treec06ac1a551096915ab771d08f3e243ceb4020177
parentd8e0b9c937dc974fef7484db3f85fabfe9272d7d (diff)
fix: Always run alertJob() on manager startup
Ensures we alert asap if we have something to alert for.
-rw-r--r--internal/manager/manager.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/manager/manager.go b/internal/manager/manager.go
index 0f206b8..55e72c0 100644
--- a/internal/manager/manager.go
+++ b/internal/manager/manager.go
@@ -86,6 +86,9 @@ func (mgr *Manager) Run(ctx context.Context) error {
alertTicker := time.NewTicker(mgr.AlertDelay)
defer alertTicker.Stop()
+ if err := mgr.alertJob(); err != nil {
+ return fmt.Errorf("unable to run alert job: %v\n", err)
+ }
shutdown := false
for {