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.23.2 lib/sshkit/runners/group.rb
sshkit-1.23.1 lib/sshkit/runners/group.rb
sshkit-1.23.0 lib/sshkit/runners/group.rb
sshkit-1.22.2 lib/sshkit/runners/group.rb
sshkit-1.22.1 lib/sshkit/runners/group.rb
sshkit-1.22.0 lib/sshkit/runners/group.rb
sshkit-1.21.7 lib/sshkit/runners/group.rb
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/sshkit-1.21.6/lib/sshkit/runners/group.rb
sshkit-1.21.6 lib/sshkit/runners/group.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/sshkit-1.21.5/lib/sshkit/runners/group.rb
sshkit-1.21.5 lib/sshkit/runners/group.rb
sshkit-1.21.4 lib/sshkit/runners/group.rb
sshkit-1.21.3 lib/sshkit/runners/group.rb
sshkit-1.21.2 lib/sshkit/runners/group.rb
sshkit-1.21.1 lib/sshkit/runners/group.rb
sshkit-1.21.0 lib/sshkit/runners/group.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/sshkit-1.18.2/lib/sshkit/runners/group.rb
sshkit-1.20.0 lib/sshkit/runners/group.rb
sshkit-1.19.1 lib/sshkit/runners/group.rb
sshkit-1.19.0 lib/sshkit/runners/group.rb