debian-mirror-gitlab/lib/gitlab/health_checks/probes/status.rb

18 lines
321 B
Ruby
Raw Normal View History

2021-12-11 22:18:48 +05:30
# rubocop:disable Naming/FileName
2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
module Gitlab
module HealthChecks
module Probes
Status = Struct.new(:http_status, :json) do
# We accept 2xx
def success?
http_status / 100 == 2
end
end
end
end
end
2021-12-11 22:18:48 +05:30
# rubocop:enable Naming/FileName