class SidekiqSpy::Spy::Queues

Public Class Methods

new() click to toggle source
# File lib/sidekiq-spy/spy/queues.rb, line 10
def initialize
  @stats = Sidekiq::Stats.new
  
  refresh
end

Public Instance Methods

refresh() click to toggle source
# File lib/sidekiq-spy/spy/queues.rb, line 16
def refresh
  h = []
  
  @stats.queues.each do |queue, size|
    h << {
      :name => queue,
      :size => size,
    }
  end
  
  @data = h
end