Sha256: cedfc983cd9875d3591c30402001bcebd36005228e23ed458bfcac2f7130f935
Contents?: true
Size: 522 Bytes
Versions: 10
Compression:
Stored size: 522 Bytes
Contents
require 'thread' module SSHKit module Runner class Parallel < Abstract def execute threads = hosts.map do |host| Thread.new(host) do |h| begin backend(h, &block).run rescue StandardError => e e2 = ExecuteError.new e raise e2, "Exception while executing #{host.user ? "as #{host.user}@" : "on host "}#{host}: #{e.message}" end end end threads.each(&:join) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems