Sha256: 0fdaf48a5ca6d8630e5abe73066202ee2d0a49d03e0a23dcd0d846664be119dd
Contents?: true
Size: 629 Bytes
Versions: 16
Compression:
Stored size: 629 Bytes
Contents
task :schedule do require 'rufus-scheduler' scheduler = Rufus::Scheduler.start_new logger = Logger.new(STDOUT) logger.level = Logger::DEBUG logger.formatter = proc do |severity, time, progname, msg| Smartkiosk::Common::Logging.format "Scheduler", severity, time, progname, msg end scheduler.every '1m' do logger.debug "Terminal ping" Terminal.ping end scheduler.every '3h' do logger.debug "Receipt Templates sync" Sync::ReceiptTemplatesWorker.perform_async end logger.debug "Schedule loaded" begin scheduler.join rescue Interrupt logger.debug "Interrupting..." end end
Version data entries
16 entries across 16 versions & 1 rubygems