Class: Mutant::Runner

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat
Defined in:
lib/mutant/runner.rb,
lib/mutant/runner/master.rb,
lib/mutant/runner/worker.rb,
lib/mutant/runner/scheduler.rb

Overview

Runner baseclass

Defined Under Namespace

Classes: Job, JobResult, Master, Scheduler, Status, Worker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeundefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize object



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/mutant/runner.rb', line 31

def initialize(*)
  super

  reporter.start(env)
  config.integration.setup

  @master = config.actor_env.new_mailbox.bind(Master.call(env))

  status = nil

  loop do
    status = current_status
    break if status.done
    reporter.progress(status)
    Kernel.sleep(reporter.delay)
  end

  reporter.progress(status)

  @master.call(:stop)

  @result = status.env_result

  reporter.report(@result)
end

Instance Attribute Details

#resultResult::Env (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return result

Returns:



63
64
65
# File 'lib/mutant/runner.rb', line 63

def result
  @result
end