Class: SSHKit::Runner::Group
- Inherits:
-
Sequential
- Object
- Abstract
- Sequential
- SSHKit::Runner::Group
- Defined in:
- lib/core_ext/sshkit/runner/group.rb
Instance Attribute Summary collapse
-
#group_size ⇒ Object
writeonly
Sets the attribute group_size.
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
#active_backend, active_backend, #active_backend=, active_backend=, #send_cmd
Instance Attribute Details
#group_size=(value) ⇒ Object (writeonly)
Sets the attribute group_size
5 6 7 |
# File 'lib/core_ext/sshkit/runner/group.rb', line 5 def group_size=(value) @group_size = value end |
Instance Method Details
#do_it(&block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/core_ext/sshkit/runner/group.rb', line 7 def do_it( &block) backends.each_slice(group_size).collect do |group_backends| Parallel.new(nil, nil).tap do |runner| runner.backends = group_backends runner.do_it(&block) end sleep wait_interval end.flatten end |