1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/lib/sidekiq
Fernando Seror 63ee43353b JobSet#each goes through elements in descending score order
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.
2017-11-01 16:12:51 -07:00
..
extensions Disable delay extensions by default, fixes #3174 (#3299) 2017-01-04 10:30:42 -08:00
middleware Remove job duplication edge case with Sidekiq Pro, fixes #3388 2017-03-15 10:03:47 -07:00
testing Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
web Update redis gem to avoid using the deprecated client API, fixes #3617 2017-09-28 21:43:41 -07:00
api.rb JobSet#each goes through elements in descending score order 2017-11-01 16:12:51 -07:00
cli.rb fix cli 2017-06-05 11:30:31 -07:00
client.rb Add docs for the class arg of Client.push 2017-08-11 16:25:44 -07:00
core_ext.rb Remove core_ext usage 2017-06-05 10:45:39 -07:00
delay.rb Ensure Sidekiq.enable_delay! does not break Psych. 2017-07-29 08:49:54 +02:00
exception_handler.rb Merge branch 'master' into frozen 2016-04-21 13:15:00 -07:00
fetch.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
job_logger.rb Rescue at the method level in JobLogger (#3464) 2017-05-08 12:50:36 -07:00
job_retry.rb Unified Job kill via Sidekiq::DeadSet#kill 2017-08-11 12:33:12 -07:00
launcher.rb Switch default quiet signal to TSTP as it is available on JRuby, fixes #3302 (#3302) 2017-01-03 15:24:48 -08:00
logging.rb Extract Processor#log_context to ease extending what's logged (#3463) 2017-05-10 11:56:36 -07:00
manager.rb Update Manager description (#3291) 2016-12-23 08:15:16 -08:00
paginator.rb Freeze all string literals in source, fixes #2741 2015-12-31 15:33:35 -08:00
processor.rb When a middleware mutates arguments, retry with original args 2017-08-11 16:33:55 -07:00
rails.rb Added warning to STDERR if we detect Rails 3.x (< 4) about Sidekiq not supporting this version any more 2017-10-26 13:18:59 -07:00
redis_connection.rb Allow users to disable ID generation since some redis providers disable the CLIENT command, fixes #3521 2017-06-21 04:54:18 -07:00
scheduled.rb Fix Ruby warnings, thanks for the reminder @nateberkopec 2016-08-30 13:29:03 -07:00
testing.rb Push constantize impl to where it is used. 2017-05-15 14:57:03 -07:00
util.rb Freeze sidekiq_label string constant to prevent unnecessary allocations 2017-07-20 11:07:21 -07:00
version.rb Refactor Worker.set impl so it can be memoized, fixes #3602 2017-09-12 10:49:05 -07:00
web.rb class attributes must inherit or we break Pro UI extensions 2016-10-17 11:16:26 -07:00
worker.rb Refactor Worker.set impl so it can be memoized, fixes #3602 2017-09-12 10:49:05 -07:00