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>2019-11-07 18:06:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-07 18:06:33 +0300
commit90a06a20be61bb6d48d77746091492831153e075 (patch)
treebdba99289605f8b5acf12159d02aeb23f8690202 /app/controllers/health_controller.rb
parent84a0e65ac88c7a3db86a0e4347606ba093490bef (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/health_controller.rb')
-rw-r--r--app/controllers/health_controller.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/health_controller.rb b/app/controllers/health_controller.rb
index efd5f0fc607..c6a02250896 100644
--- a/app/controllers/health_controller.rb
+++ b/app/controllers/health_controller.rb
@@ -5,6 +5,11 @@ class HealthController < ActionController::Base
include RequiresWhitelistedMonitoringClient
CHECKS = [
+ Gitlab::HealthChecks::MasterCheck
+ ].freeze
+
+ ALL_CHECKS = [
+ *CHECKS,
Gitlab::HealthChecks::DbCheck,
Gitlab::HealthChecks::Redis::RedisCheck,
Gitlab::HealthChecks::Redis::CacheCheck,
@@ -14,8 +19,9 @@ class HealthController < ActionController::Base
].freeze
def readiness
- # readiness check is a collection with all above application-level checks
- render_checks(*CHECKS)
+ # readiness check is a collection of application-level checks
+ # and optionally all service checks
+ render_checks(params[:all] ? ALL_CHECKS : CHECKS)
end
def liveness
@@ -25,7 +31,7 @@ class HealthController < ActionController::Base
private
- def render_checks(*checks)
+ def render_checks(checks = [])
result = Gitlab::HealthChecks::Probes::Collection
.new(*checks)
.execute