Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider 25345c90 rédigé par Takeshi Umeda's avatar Takeshi Umeda Validation de GitHub
Parcourir les fichiers

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
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter