summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 12:11:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-09 12:11:57 +0000
commit1f229cdc22b5b32989bcff2037d8925c75703671 (patch)
treec92e9dff7737e78d7331518cdf69f90403af09ea /lib/feature.rb
parent7a98d989740ec85982cdb6c1d57c8f24270e455e (diff)
downloadgitlab-ce-1f229cdc22b5b32989bcff2037d8925c75703671.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index ca91d86c199..f317e8cb2c5 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -31,7 +31,11 @@ module Feature
def feature_flags_available?
# When the DBMS is not available, an exception (e.g. PG::ConnectionBad) is raised
- active_db_connection = ActiveRecord::Base.connection.active? rescue false # rubocop:disable Database/MultipleDatabases
+ active_db_connection = begin
+ ActiveRecord::Base.connection.active? # rubocop:disable Database/MultipleDatabases
+ rescue StandardError
+ false
+ end
active_db_connection && Feature::FlipperFeature.table_exists?
rescue ActiveRecord::NoDatabaseError