Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 21:08:51 +0300
commitdf2eda3f14dccb703bd7054d4ddde7803cb1fe7e (patch)
tree0200bb0def01cde22da3bc4c9ed0a7b0f91d6b50 /config/initializers
parentb9bac6dbf78a5a7976fba14aaeef96bdeb0da612 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/active_record_lifecycle.rb2
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!