class Lowkiq::Splitters::Default

Public Class Methods

new(threads_per_node) click to toggle source
# File lib/lowkiq/splitters/default.rb, line 4
def initialize(threads_per_node)
  @threads_per_node = threads_per_node
end

Public Instance Methods

call(shard_handlers) click to toggle source
# File lib/lowkiq/splitters/default.rb, line 8
def call(shard_handlers)
  Utils::Array.new(shard_handlers)
    .in_transposed_groups(@threads_per_node)
    .reject(&:empty?)
end