mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Sort queues by name
This commit is contained in:
parent
63eafb1093
commit
051150931e
2 changed files with 1 additions and 2 deletions
|
@ -118,7 +118,7 @@ module Sidekiq
|
||||||
include Enumerable
|
include Enumerable
|
||||||
|
|
||||||
def self.all
|
def self.all
|
||||||
Sidekiq.redis {|c| c.smembers('queues') }.map {|q| Sidekiq::Queue.new(q) }
|
Sidekiq.redis {|c| c.smembers('queues') }.sort.map {|q| Sidekiq::Queue.new(q) }
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
|
|
@ -58,7 +58,6 @@ module Sidekiq
|
||||||
|
|
||||||
get "/queues" do
|
get "/queues" do
|
||||||
@queues = Sidekiq::Queue.all
|
@queues = Sidekiq::Queue.all
|
||||||
@queues.sort! {|a,b| a.name <=> b.name}
|
|
||||||
erb :queues
|
erb :queues
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue