diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 15:07:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 15:07:52 +0000 |
commit | afe2b984524ae4b0c8a0636db7ec5b2c452f0734 (patch) | |
tree | 3de39f954c7239e09a9afe84263a64e7042b2b60 /config/initializers | |
parent | 5a6b36b60502c50ab59c0bc3c345793b70a3d548 (diff) | |
download | gitlab-ce-afe2b984524ae4b0c8a0636db7ec5b2c452f0734.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/active_record_force_reconnects.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/active_record_force_reconnects.rb b/config/initializers/active_record_force_reconnects.rb new file mode 100644 index 00000000000..73dfaf5e121 --- /dev/null +++ b/config/initializers/active_record_force_reconnects.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +Gitlab::Database::ConnectionTimer.configure do |config| + config.interval = Rails.application.config_for(:database)[:force_reconnect_interval] +end + +ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(Gitlab::Database::PostgresqlAdapter::ForceDisconnectableMixin) |