diff options
author | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-01-04 14:22:20 +0100 |
---|---|---|
committer | Rasmus Dahlberg <rgdd@glasklarteknik.se> | 2025-01-04 14:22:20 +0100 |
commit | b6bf2fdfd6fb9f4a2894c2a4dbfad3a82b75fdea (patch) | |
tree | c06ac1a551096915ab771d08f3e243ceb4020177 /internal | |
parent | d8e0b9c937dc974fef7484db3f85fabfe9272d7d (diff) |
fix: Always run alertJob() on manager startup
Ensures we alert asap if we have something to alert for.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/manager/manager.go | 3 |
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 { |