From bf645d0b814a045a012f8c247009cd045769e0fc Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 30 Jun 2024 22:59:08 -0300 Subject: [PATCH] sweepbatcher: log batcher failures This is useful to debug. It used to fail silently. --- sweepbatcher/sweep_batcher.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sweepbatcher/sweep_batcher.go b/sweepbatcher/sweep_batcher.go index 25599098f..b476aac22 100644 --- a/sweepbatcher/sweep_batcher.go +++ b/sweepbatcher/sweep_batcher.go @@ -375,18 +375,22 @@ func (b *Batcher) Run(ctx context.Context) error { case sweepReq := <-b.sweepReqs: sweep, err := b.fetchSweep(runCtx, sweepReq) if err != nil { + log.Warnf("fetchSweep failed: %v.", err) return err } err = b.handleSweep(runCtx, sweep, sweepReq.Notifier) if err != nil { + log.Warnf("handleSweep failed: %v.", err) return err } case err := <-b.errChan: + log.Warnf("Batcher received an error: %v.", err) return err case <-runCtx.Done(): + log.Infof("Stopping Batcher: run context cancelled.") return runCtx.Err() } }