Module: HireFire::Macro::Resque
- Extended by:
- Errors::JobQueueLatencyUnsupported, Deprecated::Resque, Resque, Utility
- Included in:
- Resque
- Defined in:
- lib/hirefire/macro/resque.rb
Constant Summary collapse
- SIZE_METHODS =
[ :enqueued_size, :working_size, :scheduled_size ].freeze
Instance Method Summary collapse
-
#job_queue_size(*queues) ⇒ Integer
Calculates the maximum job queue size using Resque.
Methods included from Errors::JobQueueLatencyUnsupported
Methods included from Deprecated::Resque
Instance Method Details
#job_queue_size(*queues) ⇒ Integer
Calculates the maximum job queue size using Resque. If no queues are specified, it measures size across all available queues.
31 32 33 34 35 36 37 |
# File 'lib/hirefire/macro/resque.rb', line 31 def job_queue_size(*queues) queues = normalize_queues(queues, allow_empty: true) SIZE_METHODS.sum do |size_method| method(size_method).call(queues) end end |