From 894d12f903a40ce96d05d4bf8f3beca7efa5f635 Mon Sep 17 00:00:00 2001 From: zhaoxiangchun <1422928955@qq.com> Date: Mon, 21 Jun 2021 16:08:48 +0800 Subject: [PATCH] fix(monitor): exit monitor engine in time when happen err --- pkg/monitor/alerting/engine.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/monitor/alerting/engine.go b/pkg/monitor/alerting/engine.go index 622a629486..18986c270e 100644 --- a/pkg/monitor/alerting/engine.go +++ b/pkg/monitor/alerting/engine.go @@ -211,6 +211,9 @@ func (e *AlertEngine) processJob(attemptID int, attemptChan chan int, cancelChan attemptChan <- (attemptID + 1) return } + log.Errorf("gt AlertingMaxAttempts, error: %v", evalContext.Error) + close(attemptChan) + return } // create new context with timeout for notifications