gitlab-org--gitlab-foss/lib/system_check/gitaly_check.rb
Michael Kozono 6855e6b586 Extract system check rake task logic
These changes make the code more reusable, testable, and most
importantly, overrideable.
2018-12-03 13:51:46 -08:00

19 lines
430 B
Ruby

# 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