Skip to content

Commit

Permalink
Shuffle the matching queues
Browse files Browse the repository at this point in the history
  • Loading branch information
snmaynard committed Mar 28, 2012
1 parent 184fa03 commit f11585f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/resque/plugins/dynamic_queues/queues.rb
Expand Up @@ -19,7 +19,7 @@ module Queues
def queues_with_dynamic
queue_names = @queues.dup

return queues_without_dynamic if queue_names.grep(/(^!)|(^@)|(\*)/).size == 0
return queues_without_dynamic.shuffle if queue_names.grep(/(^!)|(^@)|(\*)/).size == 0

real_queues = Resque.queues
matched_queues = []
Expand Down Expand Up @@ -54,7 +54,7 @@ def queues_with_dynamic
end
end

return matched_queues.uniq.sort
return matched_queues.uniq.shuffle
end


Expand Down

0 comments on commit f11585f

Please sign in to comment.