diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-14 12:13:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-14 12:13:38 +0300 |
commit | 41482e5dce6765dc2ec019da1c652061fc8d8f83 (patch) | |
tree | 99dd2230ae58ada72a404a5e96800789a7efe947 /lib/gitlab/current_settings.rb | |
parent | a1c59f6d02debe4ff6dc74b3e482f6a5783ddf8f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r-- | lib/gitlab/current_settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb index 2d2d8c41236..0d6767ad564 100644 --- a/lib/gitlab/current_settings.rb +++ b/lib/gitlab/current_settings.rb @@ -62,7 +62,7 @@ module Gitlab # need to be added to the application settings. To prevent Rake tasks # and other callers from failing, use any loaded settings and return # defaults for missing columns. - if Gitlab::Runtime.rake? && ActiveRecord::Base.connection.migration_context.needs_migration? + if Gitlab::Runtime.rake? && ::ApplicationSetting.connection.migration_context.needs_migration? db_attributes = current_settings&.attributes || {} fake_application_settings(db_attributes) elsif current_settings.present? @@ -82,7 +82,7 @@ module Gitlab def connect_to_db? # When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised - active_db_connection = ActiveRecord::Base.connection.active? rescue false + active_db_connection = ::ApplicationSetting.connection.active? rescue false active_db_connection && ApplicationSetting.database.cached_table_exists? |