about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-04-05 14:31:07 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-04-05 14:31:07 +0200
commitc901ae77d43bc76afc5c927c82b9b75609fa3a58 (patch)
tree41ccfe01da595433ef64e229a767ac62b7adfd92 /lib
parent39b9a0619ab4ba68ed429152153cf0dbbfcd5a5a (diff)
parent117f6638d0c402162c60915c7b8946489f1e89df (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'lib')
-rw-r--r--lib/mastodon/cli_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mastodon/cli_helper.rb b/lib/mastodon/cli_helper.rb
index ed22f44b2..aaee1fa91 100644
--- a/lib/mastodon/cli_helper.rb
+++ b/lib/mastodon/cli_helper.rb
@@ -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])