diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 21:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 21:08:01 +0300 |
commit | 8e45d25f7dde6508839ffee719c0ddc2cf6b12d3 (patch) | |
tree | 9839e7fe63b36904d40995ebf519124c9a8f7681 /lib/gitlab/health_checks | |
parent | 00c78fb814d7ce00989ac04edd6cdaa3239da284 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/health_checks')
-rw-r--r-- | lib/gitlab/health_checks/checks.rb | 14 | ||||
-rw-r--r-- | lib/gitlab/health_checks/probes/collection.rb (renamed from lib/gitlab/health_checks/probes/readiness.rb) | 7 | ||||
-rw-r--r-- | lib/gitlab/health_checks/probes/liveness.rb | 13 |
3 files changed, 3 insertions, 31 deletions
diff --git a/lib/gitlab/health_checks/checks.rb b/lib/gitlab/health_checks/checks.rb deleted file mode 100644 index c4016c5fffd..00000000000 --- a/lib/gitlab/health_checks/checks.rb +++ /dev/null @@ -1,14 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module HealthChecks - CHECKS = [ - Gitlab::HealthChecks::DbCheck, - Gitlab::HealthChecks::Redis::RedisCheck, - Gitlab::HealthChecks::Redis::CacheCheck, - Gitlab::HealthChecks::Redis::QueuesCheck, - Gitlab::HealthChecks::Redis::SharedStateCheck, - Gitlab::HealthChecks::GitalyCheck - ].freeze - end -end diff --git a/lib/gitlab/health_checks/probes/readiness.rb b/lib/gitlab/health_checks/probes/collection.rb index 28abf490ffc..db3ef4834c2 100644 --- a/lib/gitlab/health_checks/probes/readiness.rb +++ b/lib/gitlab/health_checks/probes/collection.rb @@ -3,14 +3,13 @@ module Gitlab module HealthChecks module Probes - class Readiness + class Collection attr_reader :checks # This accepts an array of objects implementing `:readiness` # that returns `::Gitlab::HealthChecks::Result` - def initialize(*additional_checks) - @checks = ::Gitlab::HealthChecks::CHECKS - @checks += additional_checks + def initialize(*checks) + @checks = checks end def execute diff --git a/lib/gitlab/health_checks/probes/liveness.rb b/lib/gitlab/health_checks/probes/liveness.rb deleted file mode 100644 index b4d346e945e..00000000000 --- a/lib/gitlab/health_checks/probes/liveness.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module HealthChecks - module Probes - class Liveness - def execute - Probes::Status.new(200, status: 'ok') - end - end - end - end -end |