diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-11-28 03:08:31 +0300 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-12-04 00:51:46 +0300 |
commit | 6855e6b5864abcf01689720424a4bea4c3b9fec2 (patch) | |
tree | 627226eee254d76b41d16cfd99f07be3f7c3f6b5 /lib/system_check/gitaly_check.rb | |
parent | c3c25174e3397ca3f301b539477e6568c676d264 (diff) |
Extract system check rake task logic
These changes make the code more reusable, testable, and most
importantly, overrideable.
Diffstat (limited to 'lib/system_check/gitaly_check.rb')
-rw-r--r-- | lib/system_check/gitaly_check.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/system_check/gitaly_check.rb b/lib/system_check/gitaly_check.rb new file mode 100644 index 00000000000..3d2517a7aca --- /dev/null +++ b/lib/system_check/gitaly_check.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module SystemCheck + class GitalyCheck < BaseCheck + set_name 'Gitaly:' + + def multi_check + Gitlab::HealthChecks::GitalyCheck.readiness.each do |result| + $stdout.print "#{result.labels[:shard]} ... " + + if result.success + $stdout.puts 'OK'.color(:green) + else + $stdout.puts "FAIL: #{result.message}".color(:red) + end + end + end + end +end |