mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
13 lines
274 B
Ruby
13 lines
274 B
Ruby
module Sidekiq
|
|
module_function
|
|
|
|
def size(*queues)
|
|
return Sidekiq::Stats.new.enqueued if queues.empty?
|
|
|
|
Sidekiq.redis { |conn|
|
|
conn.multi {
|
|
queues.map { |q| conn.llen("queue:#{q}") }
|
|
}
|
|
}.inject(0) { |memo, count| memo += count }
|
|
end
|
|
end
|