Class: SSHKit::Chunky::Runner::Chunks

Inherits:
Runner::Sequential
  • Object
show all
Defined in:
lib/sshkit/chunky/runner/chunks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#chunks_count=(value) ⇒ Object

Sets the attribute chunks_count

Parameters:

  • value

    the value to set the attribute chunks_count to.



5
6
7
# File 'lib/sshkit/chunky/runner/chunks.rb', line 5

def chunks_count=(value)
  @chunks_count = value
end

Instance Method Details

#executeObject



7
8
9
10
11
12
# File 'lib/sshkit/chunky/runner/chunks.rb', line 7

def execute
  each_chunk(hosts).map do |group_hosts|
    SSHKit::Runner::Parallel.new(group_hosts, &block).execute
    sleep wait_interval
  end.flatten
end