Skip to content

Commit aa38a1b

Browse files
committedJul 6, 2023
Add batch_size(batch_size) to __find_in_batches (Mongoid)
1 parent f0ca114 commit aa38a1b

File tree

1 file changed

+1
-1
lines changed
  • elasticsearch-model/lib/elasticsearch/model/adapters

1 file changed

+1
-1
lines changed
 

‎elasticsearch-model/lib/elasticsearch/model/adapters/mongoid.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __find_in_batches(options={}, &block)
8989
scope = all
9090
scope = scope.send(named_scope) if named_scope
9191
scope = query.is_a?(Proc) ? scope.class_exec(&query) : scope.where(query) if query
92-
scope.no_timeout.each_slice(batch_size) do |items|
92+
scope.no_timeout.batch_size(batch_size).each_slice(batch_size) do |items|
9393
yield (preprocess ? self.__send__(preprocess, items) : items)
9494
end
9595
end

0 commit comments

Comments
 (0)
Failed to load comments.