Class: SSHKit::Runner::Sequential
- Defined in:
- lib/sshkit/runners/sequential.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#wait_interval ⇒ Object
writeonly
Sets the attribute wait_interval.
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
Constructor Details
This class inherits a constructor from SSHKit::Runner::Abstract
Instance Attribute Details
#wait_interval=(value) ⇒ Object
Sets the attribute wait_interval
6 7 8 |
# File 'lib/sshkit/runners/sequential.rb', line 6 def wait_interval=(value) @wait_interval = value end |
Instance Method Details
#execute ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/sshkit/runners/sequential.rb', line 7 def execute last_host = hosts.pop hosts.each do |host| run_backend(host, &block) sleep wait_interval end unless last_host.nil? run_backend(last_host, &block) end end |