Browse Source

Check done before every rule evaluation.

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
pull/2842/head
Goutham Veeramachaneni 8 years ago
parent
commit
c472316fb3
No known key found for this signature in database
GPG Key ID: F1C217E8E9023CAD
  1. 6
      rules/manager.go

6
rules/manager.go

@ -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…
Cancel
Save