mirror of
https://github.com/mastodon/mastodon.git
synced 2026-04-24 15:18:46 -05:00
Update progress_helper.rb
This commit is contained in:
parent
759f53b3d2
commit
c8a5a176de
|
|
@ -51,8 +51,13 @@ module Mastodon::CLI
|
|||
result = ActiveRecord::Base.connection_pool.with_connection do
|
||||
yield(item)
|
||||
ensure
|
||||
RedisConnection.pool.checkin if Thread.current[:redis]
|
||||
Thread.current[:redis] = nil
|
||||
begin
|
||||
RedisConnection.pool.checkin if Thread.current[:redis]
|
||||
rescue ConnectionPool::Error
|
||||
nil
|
||||
ensure
|
||||
Thread.current[:redis] = nil
|
||||
end
|
||||
end
|
||||
|
||||
aggregate.increment(result) if result.is_a?(Integer)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user