Class: EQ::Scheduling::Scheduler
- Inherits:
-
Object
- Object
- EQ::Scheduling::Scheduler
- Includes:
- Celluloid, Logging
- Defined in:
- lib/eq-scheduling/scheduler.rb
Instance Method Summary collapse
- #clockwork ⇒ Object
-
#initialize(config) ⇒ Scheduler
constructor
A new instance of Scheduler.
Methods included from Logging
Constructor Details
#initialize(config) ⇒ Scheduler
Returns a new instance of Scheduler.
6 7 8 |
# File 'lib/eq-scheduling/scheduler.rb', line 6 def initialize config clockwork! end |
Instance Method Details
#clockwork ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/eq-scheduling/scheduler.rb', line 10 def clockwork debug 'scheduler running' loop do Clockwork.tick sleep(Clockwork.config[:sleep_timeout]) return unless Actor.current.alive? end end |