feat(alerting): do not enqueue paused rules

This commit is contained in:
bergquist 2016-10-10 13:29:10 +02:00
parent 04f417a423
commit 19427b59f9

View File

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