mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
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
This commit is contained in:
parent
19d3809ad5
commit
25345c90ff
@ -53,7 +53,9 @@ module Mastodon
|
|||||||
index.specification.lock!
|
index.specification.lock!
|
||||||
end
|
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])
|
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
|
||||||
added = Concurrent::AtomicFixnum.new(0)
|
added = Concurrent::AtomicFixnum.new(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user