mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
![]() The current implementation of the #each method uses Redis.zrange to paginate the iteration and use multiple lightweight calls. It performs this pagination in descending score order, but each page is returned from Redis in ascending order. The result is that the final iteration through the whole set is not sorted properly. Here's an example with a page of size 3: Redis set: 1, 2, 3, 4, 5, 6, 7, 8, 9 JobSet.to_a: 7, 8, 9, 4, 5, 6, 1, 2, 3 This fixes it with barely no performance cost (each page is reverted in Ruby) and all the items are perfectly sorted in descending score order. |
||
---|---|---|
.. | ||
generators/sidekiq | ||
sidekiq | ||
sidekiq.rb |