mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
Check done before every rule evaluation.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
This commit is contained in:
parent
6b70a4d850
commit
c472316fb3
|
@ -285,6 +285,12 @@ func typeForRule(r Rule) ruleType {
|
|||
// Eval runs a single evaluation cycle in which all rules are evaluated sequentially.
|
||||
func (g *Group) Eval(ts time.Time) {
|
||||
for i, rule := range g.rules {
|
||||
select {
|
||||
case <-g.done:
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
rtyp := string(typeForRule(rule))
|
||||
|
||||
func(i int, rule Rule) {
|
||||
|
|
Loading…
Reference in a new issue