renames debouceduration to for

This commit is contained in:
bergquist
2018-11-05 11:05:30 +01:00
parent d25284a364
commit ccd89eee97
8 changed files with 45 additions and 45 deletions

View File

@@ -132,9 +132,9 @@ func (c *EvalContext) GetNewState() m.AlertStateType {
return c.Rule.ExecutionErrorState.ToAlertState()
}
if c.Firing && c.Rule.DebounceDuration != 0 {
if c.Firing && c.Rule.For != 0 {
since := time.Now().Sub(c.Rule.LastStateChange)
if since > c.Rule.DebounceDuration {
if since > c.Rule.For {
return m.AlertStateAlerting
}