From b6bf2fdfd6fb9f4a2894c2a4dbfad3a82b75fdea Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Sat, 4 Jan 2025 14:22:20 +0100 Subject: fix: Always run alertJob() on manager startup Ensures we alert asap if we have something to alert for. --- internal/manager/manager.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/manager/manager.go') 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 { -- cgit v1.2.3