Sha256: 2c031ac67805c234b17c7f7eee55e06d9b1525d8613dd5d4fdac9313376894f6
Contents?: true
Size: 763 Bytes
Versions: 7
Compression:
Stored size: 763 Bytes
Contents
module Khronos module Server class Controller attr_reader :storage def initialize(runner=nil) @storage = Storage.new @runner = runner end def logger=(logger) puts "WARNING: Not implemented yet." end def check_schedule! puts "Checking... #{Time.now}" count = 0 Khronos::Scheduler.fetch(Time.now).each do |schedule| Khronos::Scheduler.run(schedule, @runner) count += 1 end puts "Tick. #{count} jobs to run." end def start! loop do check_schedule! # # Sleep 'interval' seconds # sleep(Config.instance.controller['interval']) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems