Sha256: 29c105eb8d3e98087f2db822a2bdcd5afa191821986148681622e5d93d8345ab

Contents?: true

Size: 451 Bytes

Versions: 38

Compression:

Stored size: 451 Bytes

Contents

module SSHKit

  module Runner

    class Group < Sequential
      attr_accessor :group_size

      def initialize(hosts, options = nil, &block)
        super(hosts, options, &block)
        @group_size = @options[:limit] || 2
      end

      def execute
        hosts.each_slice(group_size).collect do |group_hosts|
          Parallel.new(group_hosts, &block).execute
          sleep wait_interval
        end.flatten
      end

    end

  end

end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
sshkit-1.18.2 lib/sshkit/runners/group.rb
sshkit-1.18.1 lib/sshkit/runners/group.rb
sshkit-1.18.0 lib/sshkit/runners/group.rb
sshkit-1.17.0 lib/sshkit/runners/group.rb
sshkit-1.16.1 lib/sshkit/runners/group.rb
sshkit-1.16.0 lib/sshkit/runners/group.rb
sshkit-1.15.1 lib/sshkit/runners/group.rb
sshkit-1.15.0 lib/sshkit/runners/group.rb
sshkit-1.14.0 lib/sshkit/runners/group.rb
sshkit-1.13.1 lib/sshkit/runners/group.rb
sshkit-1.13.0 lib/sshkit/runners/group.rb
sshkit-1.12.0 lib/sshkit/runners/group.rb
sshkit-1.11.5 lib/sshkit/runners/group.rb
sshkit-1.11.4 lib/sshkit/runners/group.rb
sshkit-1.11.3 lib/sshkit/runners/group.rb
sshkit-1.11.2 lib/sshkit/runners/group.rb
sshkit-1.11.1 lib/sshkit/runners/group.rb
sshkit-1.11.0 lib/sshkit/runners/group.rb