Class: SSHKit::Runner::Sequential
- Defined in:
- lib/core_ext/sshkit/runner/sequential.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Abstract
Instance Method Summary collapse
Methods inherited from Abstract
#active_backend, active_backend, #active_backend=, active_backend=, #send_cmd
Instance Method Details
#do_it(&block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/core_ext/sshkit/runner/sequential.rb', line 4 def do_it( &block) backends.each do |backend| begin self.active_backend = backend block.call(backend.host) rescue Exception => e e2 = ExecuteError.new e raise e2, "Exception while executing on host #{backend}: #{e.message}" ensure self.active_backend = nil end sleep wait_interval end end |