Merge commit '4b9e4f6398' into kb_development

This commit is contained in:
KMY 2023-04-04 20:30:02 +09:00
commit 462c6e99b6
12 changed files with 51 additions and 14 deletions

View file

@ -52,14 +52,16 @@ module Mastodon
progress.log("Processing #{item.id}") if options[:verbose]
result = ActiveRecord::Base.connection_pool.with_connection do
yield(item)
ensure
RedisConfiguration.pool.checkin if Thread.current[:redis]
Thread.current[:redis] = nil
end
Chewy.strategy(:mastodon) do
result = ActiveRecord::Base.connection_pool.with_connection do
yield(item)
ensure
RedisConfiguration.pool.checkin if Thread.current[:redis]
Thread.current[:redis] = nil
end
aggregate.increment(result) if result.is_a?(Integer)
aggregate.increment(result) if result.is_a?(Integer)
end
rescue => e
progress.log pastel.red("Error processing #{item.id}: #{e}")
ensure

View file

@ -13,7 +13,7 @@ module Mastodon
end
def patch
1
2
end
def flags