Skip to content

Commit

Permalink
Recover filters in a single thread
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Jun 27, 2024
1 parent d23b83c commit 89346c5
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,11 @@ func (r *logRecoverer) recover(ctx context.Context) error {

r.lggr.Debugw("recovering logs", "filters", filters, "startBlock", start, "offsetBlock", offsetBlock, "latestBlock", latest)

var wg sync.WaitGroup
for _, f := range filters {
wg.Add(1)
go func(f upkeepFilter) {
defer wg.Done()
if err := r.recoverFilter(ctx, f, start, offsetBlock); err != nil {
r.lggr.Debugw("error recovering filter", "err", err.Error())
}
}(f)
if err := r.recoverFilter(ctx, f, start, offsetBlock); err != nil {
r.lggr.Debugw("error recovering filter", "err", err.Error())
}
}
wg.Wait()

return nil
}
Expand Down

0 comments on commit 89346c5

Please sign in to comment.