about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-04-06 11:17:52 +0200
committerGitHub <noreply@github.com>2021-04-06 11:17:52 +0200
commitdf326b8b5c0659edb2aca77690a892f228b0e099 (patch)
tree0d6b014047fa80270377b83e313aa882923c9429 /lib
parent39b9a0619ab4ba68ed429152153cf0dbbfcd5a5a (diff)
parent5c225b03db280c94dc3519dc5bad2cac86487e9b (diff)
Merge pull request #1519 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
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])