Fix Style/MapIntoArray
cop in cli progress helper (#29884)
This commit is contained in:
parent
b57ee5cf5b
commit
4565015615
1 changed files with 2 additions and 4 deletions
|
@ -35,10 +35,8 @@ module Mastodon::CLI
|
||||||
aggregate = Concurrent::AtomicFixnum.new(0)
|
aggregate = Concurrent::AtomicFixnum.new(0)
|
||||||
|
|
||||||
scope.reorder(nil).find_in_batches do |items|
|
scope.reorder(nil).find_in_batches do |items|
|
||||||
futures = []
|
futures = items.map do |item|
|
||||||
|
Concurrent::Future.execute(executor: pool) do
|
||||||
items.each do |item|
|
|
||||||
futures << Concurrent::Future.execute(executor: pool) do
|
|
||||||
if !progress.total.nil? && progress.progress + 1 > progress.total
|
if !progress.total.nil? && progress.progress + 1 > progress.total
|
||||||
# The number of items has changed between start and now,
|
# The number of items has changed between start and now,
|
||||||
# since there is no good way to predict the final count from
|
# since there is no good way to predict the final count from
|
||||||
|
|
Loading…
Reference in a new issue