Class: Sidekiq::Simulator
- Inherits:
-
Object
- Object
- Sidekiq::Simulator
- Extended by:
- Forwardable
- Defined in:
- lib/sidekiq/simulator.rb
Instance Attribute Summary collapse
-
#launcher ⇒ Object
readonly
Returns the value of attribute launcher.
-
#queues ⇒ Object
readonly
Returns the value of attribute queues.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(queue) ⇒ Simulator
constructor
A new instance of Simulator.
- #process_queue ⇒ Object
Constructor Details
Instance Attribute Details
#launcher ⇒ Object (readonly)
Returns the value of attribute launcher.
9 10 11 |
# File 'lib/sidekiq/simulator.rb', line 9 def launcher @launcher end |
#queues ⇒ Object (readonly)
Returns the value of attribute queues.
9 10 11 |
# File 'lib/sidekiq/simulator.rb', line 9 def queues @queues end |
Class Method Details
.process_queue(queue) ⇒ Object
11 12 13 |
# File 'lib/sidekiq/simulator.rb', line 11 def self.process_queue(queue) new(queue).process_queue { yield } end |
Instance Method Details
#process_queue ⇒ Object
20 21 22 23 24 |
# File 'lib/sidekiq/simulator.rb', line 20 def process_queue run_launcher { yield } ensure terminate_launcher end |