Skip to content

Commit ca33622

Browse files
committed
style(alerting): rename max retries
1 parent 3ad90c3 commit ca33622

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/services/alerting/alerting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
var (
9-
maxRetries = 3
9+
maxAlertExecutionRetries = 3
1010
)
1111

1212
var engine *Engine

pkg/services/alerting/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (e *Engine) resultHandler() {
118118
e.log.Error("Alert Rule Result Error After Max Retries", "ruleId", result.AlertJob.Rule.Id, "error", result.Error, "retry", result.AlertJob.RetryCount)
119119

120120
result.State = alertstates.Critical
121-
result.Description = fmt.Sprintf("Failed to run check after %d retires, Error: %v", maxRetries, result.Error)
121+
result.Description = fmt.Sprintf("Failed to run check after %d retires, Error: %v", maxAlertExecutionRetries, result.Error)
122122
e.saveState(result)
123123
}
124124
} else {

pkg/services/alerting/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type AlertJob struct {
99
}
1010

1111
func (aj *AlertJob) Retryable() bool {
12-
return aj.RetryCount < maxRetries
12+
return aj.RetryCount < maxAlertExecutionRetries
1313
}
1414

1515
func (aj *AlertJob) ResetRetry() {

0 commit comments

Comments
 (0)