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>2022-08-09 15:11:57 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 15:11:57 +0300
commit1f229cdc22b5b32989bcff2037d8925c75703671 (patch)
treec92e9dff7737e78d7331518cdf69f90403af09ea /lib/gitlab/current_settings.rb
parent7a98d989740ec85982cdb6c1d57c8f24270e455e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r--lib/gitlab/current_settings.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 8ef4977177a..5c4899da11f 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -84,7 +84,11 @@ module Gitlab
def connect_to_db?
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
- active_db_connection = ::ApplicationSetting.connection.active? rescue false
+ active_db_connection = begin
+ ::ApplicationSetting.connection.active?
+ rescue StandardError
+ false
+ end
active_db_connection &&
ApplicationSetting.database.cached_table_exists?