diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /config/initializers/active_record_force_reconnects.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'config/initializers/active_record_force_reconnects.rb')
-rw-r--r-- | config/initializers/active_record_force_reconnects.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/config/initializers/active_record_force_reconnects.rb b/config/initializers/active_record_force_reconnects.rb index 73dfaf5e121..ff264a55ad2 100644 --- a/config/initializers/active_record_force_reconnects.rb +++ b/config/initializers/active_record_force_reconnects.rb @@ -1,7 +1,8 @@ # frozen_string_literal: true Gitlab::Database::ConnectionTimer.configure do |config| - config.interval = Rails.application.config_for(:database)[:force_reconnect_interval] + configuration_hash = ActiveRecord::Base.configurations.find_db_config(Rails.env).configuration_hash + config.interval = configuration_hash[:force_reconnect_interval] end ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Gitlab::Database::PostgresqlAdapter::ForceDisconnectableMixin) |