Module: HireFire::Macro::QC

Extended by:
QC
Included in:
QC
Defined in:
lib/hirefire/macro/qc.rb

Instance Method Summary collapse

Instance Method Details

#queue(queue = "default") ⇒ Integer

Queries the PostgreSQL database through QueueClassic in order to count the amount of jobs in the specified queue.

Examples:

QueueClassic Macro Usage

HireFire::Macro::QC.queue # counts the `default` queue.
HireFire::Macro::QC.queue("email") # counts the `email` queue.


18
19
20
# File 'lib/hirefire/macro/qc.rb', line 18

def queue(queue = "default")
  ::QC::Queue.new(queue).count
end