Sha256: d4788c2bb2765d54227c6183d2ec973f6dcb4c912ba67ab2a2e2362be7a7b134
Contents?: true
Size: 784 Bytes
Versions: 15
Compression:
Stored size: 784 Bytes
Contents
require 'optimus-runner/server/optimus_runner_sm' require 'rufus/scheduler' require 'logger' require 'dotenv' require 'optparse' require 'optimus-runner/utils/optimuscloudenv.rb' optimus_runner_sm = OptimusRunnerSM.new scheduler = Rufus::Scheduler.new logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.info "Starting Optimus runner..." logger.info "Loading Optimus Cloud Env" scheduler.interval '5s', :first_in => 0.1 do logger.info "Is Optimus runner idle? #{optimus_runner_sm.idle?}" optimus_runner_sm.create if optimus_runner_sm.idle? optimus_runner_sm.add if optimus_runner_sm.new_device_added? optimus_runner_sm.remove if optimus_runner_sm.device_removed? optimus_runner_sm.restart if optimus_runner_sm.session_terminated? end scheduler.join
Version data entries
15 entries across 15 versions & 1 rubygems