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
03354bc4
Commit
03354bc4
authored
Feb 24, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tech: replace context.TODO with background ctx
parent
e73b306e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
pkg/api/metrics.go
+1
-1
pkg/services/alerting/engine.go
+1
-1
pkg/services/alerting/test_notification.go
+1
-1
pkg/services/alerting/test_rule.go
+1
-1
pkg/services/notifications/webhook.go
+1
-1
No files found.
pkg/api/metrics.go
View file @
03354bc4
...
...
@@ -33,7 +33,7 @@ func QueryMetrics(c *middleware.Context, reqDto dtos.MetricRequest) Response {
})
}
resp
,
err
:=
tsdb
.
HandleRequest
(
context
.
TODO
(),
request
)
resp
,
err
:=
tsdb
.
HandleRequest
(
context
.
Background
(),
request
)
if
err
!=
nil
{
return
ApiError
(
500
,
"Metric request error"
,
err
)
}
...
...
pkg/services/alerting/engine.go
View file @
03354bc4
...
...
@@ -98,7 +98,7 @@ func (e *Engine) processJob(grafanaCtx context.Context, job *Job) error {
}
}()
alertCtx
,
cancelFn
:=
context
.
WithTimeout
(
context
.
TODO
(),
alertTimeout
)
alertCtx
,
cancelFn
:=
context
.
WithTimeout
(
context
.
Background
(),
alertTimeout
)
job
.
Running
=
true
evalContext
:=
NewEvalContext
(
alertCtx
,
job
.
Rule
)
...
...
pkg/services/alerting/test_notification.go
View file @
03354bc4
...
...
@@ -50,7 +50,7 @@ func createTestEvalContext(cmd *NotificationTestCommand) *EvalContext {
State
:
m
.
AlertStateAlerting
,
}
ctx
:=
NewEvalContext
(
context
.
TODO
(),
testRule
)
ctx
:=
NewEvalContext
(
context
.
Background
(),
testRule
)
if
cmd
.
Settings
.
Get
(
"uploadImage"
)
.
MustBool
(
true
)
{
ctx
.
ImagePublicUrl
=
"http://grafana.org/assets/img/blog/mixed_styles.png"
}
...
...
pkg/services/alerting/test_rule.go
View file @
03354bc4
...
...
@@ -49,7 +49,7 @@ func handleAlertTestCommand(cmd *AlertTestCommand) error {
func
testAlertRule
(
rule
*
Rule
)
*
EvalContext
{
handler
:=
NewEvalHandler
()
context
:=
NewEvalContext
(
context
.
TODO
(),
rule
)
context
:=
NewEvalContext
(
context
.
Background
(),
rule
)
context
.
IsTestRun
=
true
handler
.
Eval
(
context
)
...
...
pkg/services/notifications/webhook.go
View file @
03354bc4
...
...
@@ -37,7 +37,7 @@ func processWebhookQueue() {
for
{
select
{
case
webhook
:=
<-
webhookQueue
:
err
:=
sendWebRequestSync
(
context
.
TODO
(),
webhook
)
err
:=
sendWebRequestSync
(
context
.
Background
(),
webhook
)
if
err
!=
nil
{
webhookLog
.
Error
(
"Failed to send webrequest "
,
"error"
,
err
)
...
...
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