Sha256: 92f5106ce6b044ec7ff1c5644575e8db753d7b42559e474a1b82df233e54dc97
Contents?: true
Size: 612 Bytes
Versions: 11
Compression:
Stored size: 612 Bytes
Contents
module Embulk module Input class Elasticsearch < InputPlugin class InputThread def self.get_slice_from_num_threads(array, define_num_threads) num_threads = array.size < define_num_threads ? array.size : define_num_threads per_queries = if (array.size % num_threads) == 0 (array.size / num_threads) else (array.size / num_threads) + 1 end sliced = array.each_slice(per_queries).to_a Embulk.logger.info("calculate num threads => #{sliced.size}") return sliced end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems