Explorar o código

feat(alerting): do not enqueue paused rules

bergquist %!s(int64=9) %!d(string=hai) anos
pai
achega
19427b59f9
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      pkg/services/alerting/scheduler.go

+ 2 - 1
pkg/services/alerting/scheduler.go

@@ -5,6 +5,7 @@ import (
 	"time"
 
 	"github.com/grafana/grafana/pkg/log"
+	"github.com/grafana/grafana/pkg/models"
 )
 
 type SchedulerImpl struct {
@@ -48,7 +49,7 @@ func (s *SchedulerImpl) Tick(tickTime time.Time, execQueue chan *Job) {
 	now := tickTime.Unix()
 
 	for _, job := range s.jobs {
-		if job.Running {
+		if job.Running || job.Rule.State == models.AlertStatePaused {
 			continue
 		}