From 6ca7722fd19bc241b5ea32ade80567a506fea795 Mon Sep 17 00:00:00 2001 From: AleksandrMatsko Date: Wed, 11 Dec 2024 14:29:52 +0700 Subject: [PATCH] fix: add return statement --- notifier/alive_watcher.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/notifier/alive_watcher.go b/notifier/alive_watcher.go index 3bad07b1b..82963ca69 100644 --- a/notifier/alive_watcher.go +++ b/notifier/alive_watcher.go @@ -2,6 +2,7 @@ package notifier import ( "context" + "fmt" "time" "github.com/moira-alert/moira" @@ -53,9 +54,13 @@ func (watcher *AliveWatcher) stateChecker(ctx context.Context) { func (watcher *AliveWatcher) checkNotifierState() { state, _ := watcher.database.GetNotifierState() + fmt.Println(state) if state != moira.SelfStateOK { watcher.notifierMetrics.MarkNotifierIsAlive(false) + fmt.Println("Marked as not alive") + return } watcher.notifierMetrics.MarkNotifierIsAlive(true) + fmt.Println("Marked as alive") }