From ed91fdb7fc539b86c38eb684943ec801559dc426 Mon Sep 17 00:00:00 2001 From: Martin Chodur Date: Thu, 11 Jul 2019 17:53:10 +0200 Subject: [PATCH] fix compact: minor fixes --- cmd/thanos/compact.go | 8 ++++---- cmd/thanos/main.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/thanos/compact.go b/cmd/thanos/compact.go index 68a25a17034..a36b1a958ca 100644 --- a/cmd/thanos/compact.go +++ b/cmd/thanos/compact.go @@ -70,8 +70,8 @@ func (cs compactionSet) maxLevel() int { } func registerCompact(m map[string]setupFunc, app *kingpin.Application) { - component := component.Compact - cmd := app.Command(component.String(), "continuously compacts blocks in an object store bucket") + comp := component.Compact + cmd := app.Command(comp.String(), "continuously compacts blocks in an object store bucket") haltOnError := cmd.Flag("debug.halt-on-error", "Halt the process if a critical compaction error is detected."). Hidden().Default("true").Bool() @@ -113,7 +113,7 @@ func registerCompact(m map[string]setupFunc, app *kingpin.Application) { compactionConcurrency := cmd.Flag("compact.concurrency", "Number of goroutines to use when compacting groups."). Default("1").Int() - m[component.String()] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error { + m[comp.String()] = func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ bool) error { return runCompact(g, logger, reg, *httpAddr, *dataDir, @@ -128,7 +128,7 @@ func registerCompact(m map[string]setupFunc, app *kingpin.Application) { compact.ResolutionLevel5m: time.Duration(*retention5m), compact.ResolutionLevel1h: time.Duration(*retention1h), }, - component, + comp, *disableDownsampling, *maxCompactionLevel, *blockSyncConcurrency, diff --git a/cmd/thanos/main.go b/cmd/thanos/main.go index 210a2d6aa98..4c26654401c 100644 --- a/cmd/thanos/main.go +++ b/cmd/thanos/main.go @@ -347,7 +347,7 @@ func defaultHTTPListener(g *run.Group, logger log.Logger, reg *prometheus.Regist } g.Add(func() error { - level.Info(logger).Log("msg", "Listening for metrics", "address", httpBindAddr) + level.Info(logger).Log("msg", "listening for metrics", "address", httpBindAddr) readinessProber.SetHealthy() return errors.Wrap(http.Serve(l, mux), "serve metrics") }, func(err error) {