mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Shuffle queues in place before fetching
This commit is contained in:
parent
1701c83788
commit
705d6ca7ea
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ module Sidekiq
|
|||
@strictly_ordered_queues = !!options[:strict]
|
||||
@queues = options[:queues].map { |q| "queue:#{q}" }
|
||||
if @strictly_ordered_queues
|
||||
@queues = @queues.uniq
|
||||
@queues.uniq!
|
||||
@queues << TIMEOUT
|
||||
end
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ module Sidekiq
|
|||
if @strictly_ordered_queues
|
||||
@queues
|
||||
else
|
||||
queues = @queues.shuffle.uniq
|
||||
queues = @queues.shuffle!.uniq
|
||||
queues << TIMEOUT
|
||||
queues
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue