Class: Fragmentary::Dispatcher
- Inherits:
-
Object
- Object
- Fragmentary::Dispatcher
- Defined in:
- lib/fragmentary/dispatcher.rb
Instance Method Summary collapse
-
#initialize(tasks) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
- #perform ⇒ Object
Constructor Details
#initialize(tasks) ⇒ Dispatcher
Returns a new instance of Dispatcher.
4 5 6 |
# File 'lib/fragmentary/dispatcher.rb', line 4 def initialize(tasks) @tasks = tasks end |
Instance Method Details
#perform ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/fragmentary/dispatcher.rb', line 8 def perform @tasks.each do |task| Rails.logger.info "***** Dispatching task for handler class #{task.class.name}" task.call end RequestQueue.all.each do |queue| queue.start end end |