Sha256: 74f9b74d65d6764b0b1f41a63b81c99fd2400af48693c8a926999564e46aa78d
Contents?: true
Size: 940 Bytes
Versions: 21
Compression:
Stored size: 940 Bytes
Contents
require 'optimus-runner/version' require 'daemons' require 'optimus-runner/server/appium_server_manager' module Gandalf class Optimus_Runner attr_reader :options, :optimus_runner_sm, :scheduler def initialize(options) @options = options @optimus_runner_sm = OptimusRunnerSM.new @scheduler = Rufus::Scheduler.new logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.info "Starting Optimus runner..." end def run! @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 end end end
Version data entries
21 entries across 21 versions & 1 rubygems