Class: Specjour::Dispatcher
- Inherits:
-
Object
- Object
- Specjour::Dispatcher
- Includes:
- SocketHelpers
- Defined in:
- lib/specjour/dispatcher.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.interrupted ⇒ Object
(also: interrupted?)
Returns the value of attribute interrupted.
Instance Attribute Summary collapse
-
#hosts ⇒ Object
readonly
Returns the value of attribute hosts.
-
#manager_threads ⇒ Object
readonly
Returns the value of attribute manager_threads.
-
#managers ⇒ Object
readonly
Returns the value of attribute managers.
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
-
#worker_size ⇒ Object
Returns the value of attribute worker_size.
Instance Method Summary collapse
-
#initialize(project_path) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
- #start ⇒ Object
Methods included from SocketHelpers
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
.interrupted ⇒ Object 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
#hosts ⇒ Object (readonly)
Returns the value of attribute hosts.
12 13 14 |
# File 'lib/specjour/dispatcher.rb', line 12 def hosts @hosts end |
#manager_threads ⇒ Object (readonly)
Returns the value of attribute manager_threads.
12 13 14 |
# File 'lib/specjour/dispatcher.rb', line 12 def manager_threads @manager_threads end |
#managers ⇒ Object (readonly)
Returns the value of attribute managers.
12 13 14 |
# File 'lib/specjour/dispatcher.rb', line 12 def managers @managers end |
#project_path ⇒ Object (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_size ⇒ Object
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
#start ⇒ Object
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 |