mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
Fix DB connection pool settings in CLI (#15983)
This commit is contained in:
parent
f5bcc6bc65
commit
ddabbbf5a6
|
@ -25,7 +25,9 @@ module Mastodon
|
||||||
exit(1)
|
exit(1)
|
||||||
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)
|
||||||
|
|
||||||
progress = create_progress_bar(scope.count)
|
progress = create_progress_bar(scope.count)
|
||||||
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
|
pool = Concurrent::FixedThreadPool.new(options[:concurrency])
|
||||||
|
|
Loading…
Reference in a new issue