summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-06-18 12:44:44 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2018-06-18 12:44:44 +0000
commit7849fd36950f9eae65110b8482afba0f24e5357d (patch)
tree37eed80af43cac8ec7edac7ff2cbcc46f149e61c /lib
parent88442e02e744f730282b5d9eec93b8dd1c1768bb (diff)
parentcff72930a4806c3aa5c324b2b5bc274c5c6d2581 (diff)
downloadgitlab-ce-7849fd36950f9eae65110b8482afba0f24e5357d.tar.gz
Merge branch 'rails5-fix-db-check' into 'master'
Rails5 fix db check: connection execute returns integer instead of string See merge request gitlab-org/gitlab-ce!19901
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/health_checks/db_check.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/health_checks/db_check.rb b/lib/gitlab/health_checks/db_check.rb
index e27e16ddaf6..08495c0a59e 100644
--- a/lib/gitlab/health_checks/db_check.rb
+++ b/lib/gitlab/health_checks/db_check.rb
@@ -17,7 +17,7 @@ module Gitlab
def check
catch_timeout 10.seconds do
if Gitlab::Database.postgresql?
- ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.[]('ping')
+ ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.[]('ping')&.to_s
else
ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.first&.to_s
end