diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 21:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 21:08:51 +0300 |
commit | df2eda3f14dccb703bd7054d4ddde7803cb1fe7e (patch) | |
tree | 0200bb0def01cde22da3bc4c9ed0a7b0f91d6b50 /config | |
parent | b9bac6dbf78a5a7976fba14aaeef96bdeb0da612 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/active_record_lifecycle.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/initializers/active_record_lifecycle.rb b/config/initializers/active_record_lifecycle.rb index 2cf0f0439a9..493d328b93e 100644 --- a/config/initializers/active_record_lifecycle.rb +++ b/config/initializers/active_record_lifecycle.rb @@ -14,6 +14,8 @@ end if defined?(ActiveRecord::Base) Gitlab::Cluster::LifecycleEvents.on_before_fork do + raise 'ActiveRecord connection not established. Unable to start.' unless Gitlab::Database.exists? + # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection ActiveRecord::Base.connection.disconnect! |