Skip to content

Commit

Permalink
Set new queue IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Jun 15, 2024
1 parent dd9cd65 commit a6fb702
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,20 @@ func (b *logBuffer) SyncFilters(filterStore UpkeepFilterStore) error {
b.lock.Lock()
defer b.lock.Unlock()

for i, upkeepID := range b.queueIDs {
var newQueueIDs []string
for _, upkeepID := range b.queueIDs {
uid := new(big.Int)
_, ok := uid.SetString(upkeepID, 10)
if ok && !filterStore.Has(uid) {
// remove upkeep that is not in the filter store
delete(b.queues, upkeepID)
b.queueIDs = append(b.queueIDs[:i], b.queueIDs[i+1:]...)
} else {
newQueueIDs = append(newQueueIDs, upkeepID)
}
}

b.queueIDs = newQueueIDs

return nil
}

Expand Down

0 comments on commit a6fb702

Please sign in to comment.