mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
style(alerting): rename max retries
This commit is contained in:
parent
3ad90c389c
commit
ca33622698
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
maxRetries = 3
|
||||
maxAlertExecutionRetries = 3
|
||||
)
|
||||
|
||||
var engine *Engine
|
||||
|
@ -118,7 +118,7 @@ func (e *Engine) resultHandler() {
|
||||
e.log.Error("Alert Rule Result Error After Max Retries", "ruleId", result.AlertJob.Rule.Id, "error", result.Error, "retry", result.AlertJob.RetryCount)
|
||||
|
||||
result.State = alertstates.Critical
|
||||
result.Description = fmt.Sprintf("Failed to run check after %d retires, Error: %v", maxRetries, result.Error)
|
||||
result.Description = fmt.Sprintf("Failed to run check after %d retires, Error: %v", maxAlertExecutionRetries, result.Error)
|
||||
e.saveState(result)
|
||||
}
|
||||
} else {
|
||||
|
@ -9,7 +9,7 @@ type AlertJob struct {
|
||||
}
|
||||
|
||||
func (aj *AlertJob) Retryable() bool {
|
||||
return aj.RetryCount < maxRetries
|
||||
return aj.RetryCount < maxAlertExecutionRetries
|
||||
}
|
||||
|
||||
func (aj *AlertJob) ResetRetry() {
|
||||
|
Loading…
Reference in New Issue
Block a user