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

Version Path
optimus-runner-1.2.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.1.4 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.1.3 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.1.2 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.1.1 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.1.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-1.0.2 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.15.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.14.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.13.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.12.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.11.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.10.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.9.0 lib/optimus-runner/server/appium_server_manager.rb
optimus-runner-0.8.0 lib/optimus-runner/server/appium_server_manager.rb