diff options
Diffstat (limited to 'lib/gitlab/current_settings.rb')
-rw-r--r-- | lib/gitlab/current_settings.rb | 6 |
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? |