cleanListsRule erases the lists loaded of an Operator of type Lists, and stops the workers monitoring the lists.
(oldRule *Rule)
| 308 | // cleanListsRule erases the lists loaded of an Operator of type Lists, |
| 309 | // and stops the workers monitoring the lists. |
| 310 | func (l *Loader) cleanListsRule(oldRule *Rule) { |
| 311 | if oldRule.Operator.Type == Lists { |
| 312 | oldRule.Operator.StopMonitoringLists() |
| 313 | } else if oldRule.Operator.Type == List { |
| 314 | for i := 0; i < len(oldRule.Operator.List); i++ { |
| 315 | if oldRule.Operator.List[i].Type == Lists { |
| 316 | oldRule.Operator.List[i].StopMonitoringLists() |
| 317 | break |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | func (l *Loader) isTemporary(r *Rule) bool { |
| 324 | return r.Duration != Restart && r.Duration != Always && r.Duration != Once |
no test coverage detected