Shopify / job-iteration

Makes your background jobs interruptible and resumable by design.
https://www.rubydoc.info/gems/job-iteration
MIT License
1.15k stars 45 forks source link

Consider Active Record 7.1+ whole table iteration #493

Open bdewater opened 4 months ago

bdewater commented 4 months ago

https://github.com/rails/rails/pull/45414 introduced the use_ranges: true option which looks to iterate similarly to ActiveRecordCursor. If job-iteration switched over, it gets other improvements (e.g. descending order) as well.

fatkodima commented 3 months ago

I think, the gem can switch to as simple activerecord-related iteration implementation as in https://github.com/sidekiq/sidekiq/blob/main/lib/sidekiq/job/iterable/active_record_enumerator.rb, given that the latest activerecord now implements all the features (like different orders, iterating over multiple columns etc).