Skip to content

Commit

Permalink
add version to the context
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Jul 31, 2022
1 parent e571bc9 commit 26b6d3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/job/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"github.com/Arriven/db1000n/src/job/config"
"github.com/Arriven/db1000n/src/utils"
"github.com/Arriven/db1000n/src/utils/metrics"
"github.com/Arriven/db1000n/src/utils/ota"
"github.com/Arriven/db1000n/src/utils/templates"
)

Expand Down Expand Up @@ -200,6 +201,7 @@ func (r *Runner) runJobs(ctx context.Context, cfg *config.MultiConfig, metric *m
ctx = context.WithValue(ctx, templates.ContextKey("global_config"), r.globalJobsCfg)
ctx = context.WithValue(ctx, templates.ContextKey("goos"), runtime.GOOS)
ctx = context.WithValue(ctx, templates.ContextKey("goarch"), runtime.GOARCH)
ctx = context.WithValue(ctx, templates.ContextKey("version"), ota.Version)
ctx = context.WithValue(ctx, templates.ContextKey("metrics"), metric)

for j := 0; j < cfg.Jobs[i].Count; j++ {
Expand Down

0 comments on commit 26b6d3e

Please sign in to comment.