Skip to content
Snippets Groups Projects
Unverified Commit 25345c90 authored by Takeshi Umeda's avatar Takeshi Umeda Committed by GitHub
Browse files

Fix how to change connection pool for rails 6 (#16158)

* Fix how to change connection pool for rails 6

* Fix to match the code elsewhere
parent 19d3809a
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,9 @@ module Mastodon
index.specification.lock!
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)
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
added = Concurrent::AtomicFixnum.new(0)
......
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