Merge remote-tracking branch 'parent/main' into upstream-20240412

This commit is contained in:
KMY 2024-04-12 08:40:08 +09:00
commit b7f3cba9b4
11 changed files with 24 additions and 29 deletions

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