Skip to content

Commit

Permalink
chore: remove for in the reaper loop
Browse files Browse the repository at this point in the history
  • Loading branch information
msuchacz-cll committed Feb 14, 2025
1 parent 15fe4fe commit fddee5d
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions core/services/llo/cleanup.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,22 +94,20 @@ func (t *transmissionReaper) runLoop(ctx context.Context) {
cancel()
return
case <-ticker.C:
for {
// TODO: Could also automatically reap orphaned transmissions
// that don't have a job with a matching DON ID (from job
// deletion)
//
// https://smartcontract-it.atlassian.net/browse/MERC-6807
// TODO: Should also reap other LLO garbage that can be left
// behind e.g. channel definitions etc
n, err := t.reapStale(ctx, TransmissionReaperBatchSize)
if err != nil {
t.lggr.Errorw("Failed to reap", "err", err)
continue
}
if n > 0 {
t.lggr.Infow("Reaped stale transmissions", "nDeleted", n)
}
// TODO: Could also automatically reap orphaned transmissions
// that don't have a job with a matching DON ID (from job
// deletion)
//
// https://smartcontract-it.atlassian.net/browse/MERC-6807
// TODO: Should also reap other LLO garbage that can be left
// behind e.g. channel definitions etc
n, err := t.reapStale(ctx, TransmissionReaperBatchSize)
if err != nil {
t.lggr.Errorw("Failed to reap", "err", err)
continue
}
if n > 0 {
t.lggr.Infow("Reaped stale transmissions", "nDeleted", n)
}
}
}
Expand Down

0 comments on commit fddee5d

Please sign in to comment.