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-03-10 03:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-10 03:08:36 +0300
commit237ead18b945830ed60ac1b4382a4431d66818a6 (patch)
tree60532f9b8ee5e7dfbbdd08fdedc211b1e7b8d784 /lib/gitlab/health_checks
parent1bcebb67d554d95aa77d4cf42b22e7c96e1c8527 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/health_checks')
-rw-r--r--lib/gitlab/health_checks/db_check.rb6
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