Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ca336226
Commit
ca336226
authored
Jun 13, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(alerting): rename max retries
parent
3ad90c38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
pkg/services/alerting/alerting.go
+1
-1
pkg/services/alerting/engine.go
+1
-1
pkg/services/alerting/models.go
+1
-1
No files found.
pkg/services/alerting/alerting.go
View file @
ca336226
...
...
@@ -6,7 +6,7 @@ import (
)
var
(
maxRetries
=
3
max
AlertExecution
Retries
=
3
)
var
engine
*
Engine
...
...
pkg/services/alerting/engine.go
View file @
ca336226
...
...
@@ -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"
,
max
AlertExecution
Retries
,
result
.
Error
)
e
.
saveState
(
result
)
}
}
else
{
...
...
pkg/services/alerting/models.go
View file @
ca336226
...
...
@@ -9,7 +9,7 @@ type AlertJob struct {
}
func
(
aj
*
AlertJob
)
Retryable
()
bool
{
return
aj
.
RetryCount
<
maxRetries
return
aj
.
RetryCount
<
max
AlertExecution
Retries
}
func
(
aj
*
AlertJob
)
ResetRetry
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment