Skip to content
Snippets Groups Projects
Unverified Commit ddabbbf5 authored by abcang's avatar abcang Committed by GitHub
Browse files

Fix DB connection pool settings in CLI (#15983)

parent f5bcc6bc
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,9 @@ module Mastodon
exit(1)
end
ActiveRecord::Base.configurations[Rails.env]['pool'] = options[:concurrency] + 1
db_config = ActiveRecord::Base.configurations[Rails.env].dup
db_config['pool'] = options[:concurrency] + 1
ActiveRecord::Base.establish_connection(db_config)
progress = create_progress_bar(scope.count)
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment