Skip to content

Commit

Permalink
Set ready
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkoyun committed Sep 19, 2019
1 parent e6e27ec commit 9b6ffce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/thanos/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ func runDownsample(
}()

metrics := newDownsampleMetrics(reg)

statusProber := prober.NewProber(comp, logger, prometheus.WrapRegistererWithPrefix("thanos_", reg))
// Start cycle of syncing blocks from the bucket and garbage collecting the bucket.
{
ctx, cancel := context.WithCancel(context.Background())

g.Add(func() error {
defer runutil.CloseWithLogOnErr(logger, bkt, "bucket client")
statusProber.SetReady()

level.Info(logger).Log("msg", "start first pass of downsampling")

Expand All @@ -119,7 +120,6 @@ func runDownsample(
})
}

statusProber := prober.NewProber(comp, logger, prometheus.WrapRegistererWithPrefix("thanos_", reg))
// Initiate HTTP listener providing metrics endpoint and readiness/liveness probes.
if err := scheduleHTTPServer(g, logger, reg, statusProber, httpBindAddr, nil, comp); err != nil {
return errors.Wrap(err, "schedule HTTP server with probe")
Expand Down

0 comments on commit 9b6ffce

Please sign in to comment.