Module: HireFire::Macro::Deprecated::QC
- Included in:
- QC
- Defined in:
- lib/hirefire/macro/deprecated/queue_classic.rb
Overview
Provides backward compatibility with the deprecated QC macro. For new implementations, refer to QC.
Instance Method Summary collapse
-
#queue(queue = "default") ⇒ Integer
Retrieves the total number of jobs in the specified queue using QueueClassic.
Instance Method Details
#queue(queue = "default") ⇒ Integer
Retrieves the total number of jobs in the specified queue using QueueClassic.
This method queries the PostgreSQL database through QueueClassic. It’s capable of counting jobs in a specific queue, defaulting to the “default” queue if none is specified. It utilizes the QC::Queue class to interface with the QueueClassic system.
22 23 24 |
# File 'lib/hirefire/macro/deprecated/queue_classic.rb', line 22 def queue(queue = "default") ::QC::Queue.new(queue.to_s).count end |