Class: FistOfFury::Dispatcher

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/fist_of_fury/dispatcher.rb

Direct Known Subclasses

Actor::Dispatcher

Instance Method Summary collapse

Instance Method Details

#dispatch(worker, time) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/fist_of_fury/dispatcher.rb', line 5

def dispatch(worker, time)
  worker.schedule_next(time) do
    enqueue(worker, worker.next_scheduled_occurrence)
  end
rescue StandardError => e
  # TODO: exception handling support
  raise e
end