Class: Specjour::Dispatcher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_path) ⇒ Dispatcher

Returns a new instance of Dispatcher.



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

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

Instance Attribute Details

#hostsObject (readonly)

Returns the value of attribute hosts.



6
7
8
# File 'lib/specjour/dispatcher.rb', line 6

def hosts
  @hosts
end

#manager_threadsObject (readonly)

Returns the value of attribute manager_threads.



6
7
8
# File 'lib/specjour/dispatcher.rb', line 6

def manager_threads
  @manager_threads
end

#managersObject (readonly)

Returns the value of attribute managers.



6
7
8
# File 'lib/specjour/dispatcher.rb', line 6

def managers
  @managers
end

#project_pathObject (readonly)

Returns the value of attribute project_path.



6
7
8
# File 'lib/specjour/dispatcher.rb', line 6

def project_path
  @project_path
end

#worker_sizeObject

Returns the value of attribute worker_size.



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

def worker_size
  @worker_size
end

Instance Method Details

#startObject



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

def start
  rsync_daemon.start
  gather_managers
  dispatch_work
  printer.join
end