Module: HireFire::Macro::Qu
Instance Method Summary collapse
-
#queue(*queues) ⇒ Integer
Counts the amount of jobs in the (provided) Qu queue(s).
Instance Method Details
#queue(*queues) ⇒ Integer
Counts the amount of jobs in the (provided) Qu queue(s).
18 19 20 21 |
# File 'lib/hirefire/macro/qu.rb', line 18 def queue(*queues) queues = ::Qu.backend.queues if queues.empty? queues.flatten.inject(0) { |memo, queue| memo += ::Qu.backend.length(queue); memo } end |