Class: Specjour::Dispatcher

Inherits:
Object
  • Object
show all
Includes:
SocketHelpers
Defined in:
lib/specjour/dispatcher.rb

Direct Known Subclasses

Cucumber::Dispatcher

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SocketHelpers

#hostname, #ip_from_hostname

Constructor Details

#initialize(project_path) ⇒ Dispatcher

Returns a new instance of Dispatcher.



15
16
17
18
19
20
# File 'lib/specjour/dispatcher.rb', line 15

def initialize(project_path)
  @project_path = project_path
  @managers = []
  @worker_size = 0
  reset_manager_threads
end

Class Attribute Details

.interruptedObject Also known as: interrupted?

Returns the value of attribute interrupted.



8
9
10
# File 'lib/specjour/dispatcher.rb', line 8

def interrupted
  @interrupted
end

Instance Attribute Details

#hostsObject (readonly)

Returns the value of attribute hosts.



12
13
14
# File 'lib/specjour/dispatcher.rb', line 12

def hosts
  @hosts
end

#manager_threadsObject (readonly)

Returns the value of attribute manager_threads.



12
13
14
# File 'lib/specjour/dispatcher.rb', line 12

def manager_threads
  @manager_threads
end

#managersObject (readonly)

Returns the value of attribute managers.



12
13
14
# File 'lib/specjour/dispatcher.rb', line 12

def managers
  @managers
end

#project_pathObject (readonly)

Returns the value of attribute project_path.



12
13
14
# File 'lib/specjour/dispatcher.rb', line 12

def project_path
  @project_path
end

#worker_sizeObject

Returns the value of attribute worker_size.



13
14
15
# File 'lib/specjour/dispatcher.rb', line 13

def worker_size
  @worker_size
end

Instance Method Details

#startObject



22
23
24
25
26
27
28
# File 'lib/specjour/dispatcher.rb', line 22

def start
  rsync_daemon.start
  gather_managers
  dispatch_work
  printer.join
  exit printer.exit_status
end