1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix Style/MapIntoArray cop in cli progress helper (#29884)

This commit is contained in:
Matt Jankowski 2024-04-10 08:46:43 -04:00 committed by GitHub
parent b57ee5cf5b
commit 4565015615
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -35,10 +35,8 @@ module Mastodon::CLI
aggregate = Concurrent::AtomicFixnum.new(0)
scope.reorder(nil).find_in_batches do |items|
futures = []
items.each do |item|
futures << Concurrent::Future.execute(executor: pool) do
futures = items.map do |item|
Concurrent::Future.execute(executor: pool) do
if !progress.total.nil? && progress.progress + 1 > progress.total
# The number of items has changed between start and now,
# since there is no good way to predict the final count from