diff options
Diffstat (limited to 'lib/gitlab/health_checks/db_check.rb')
-rw-r--r-- | lib/gitlab/health_checks/db_check.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/health_checks/db_check.rb b/lib/gitlab/health_checks/db_check.rb index ec4b97eaca4..3df312af1bc 100644 --- a/lib/gitlab/health_checks/db_check.rb +++ b/lib/gitlab/health_checks/db_check.rb @@ -13,12 +13,14 @@ module Gitlab end def successful?(result) - result == '1' + result == Gitlab::Database.database_base_models.size end def check catch_timeout 10.seconds do - ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.[]('ping')&.to_s + Gitlab::Database.database_base_models.sum do |_, base| + base.connection.select_value('SELECT 1') + end end end end |