Class: GroupRunner
- Inherits:
-
SequentialRunner
- Object
- Runner
- SequentialRunner
- GroupRunner
- Defined in:
- lib/sshkit/connection_manager.rb
Instance Attribute Summary collapse
-
#group_size ⇒ Object
writeonly
Sets the attribute group_size.
Attributes inherited from Runner
Instance Method Summary collapse
Methods inherited from Runner
Constructor Details
This class inherits a constructor from Runner
Instance Attribute Details
#group_size=(value) ⇒ Object
Sets the attribute group_size
41 42 43 |
# File 'lib/sshkit/connection_manager.rb', line 41 def group_size=(value) @group_size = value end |
Instance Method Details
#execute ⇒ Object
42 43 44 45 46 47 |
# File 'lib/sshkit/connection_manager.rb', line 42 def execute hosts.each_slice(group_size).collect do |group_hosts| ParallelRunner.new(group_hosts, &block).execute sleep wait_interval end.flatten end |