diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 20:02:27 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:42 +0300 |
commit | 622c912d5b896380a0d0a1db61bbf9d1cb990c80 (patch) | |
tree | de2a6356cef84cc302b2030614c8e1a7538c9fb8 /lib/gitlab/health_checks/simple_abstract_check.rb | |
parent | 78c5d4ddc2af74f352d4871689c7b8451b612b13 (diff) |
replace `is_successful?` with `successful?`
Diffstat (limited to 'lib/gitlab/health_checks/simple_abstract_check.rb')
-rw-r--r-- | lib/gitlab/health_checks/simple_abstract_check.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/health_checks/simple_abstract_check.rb b/lib/gitlab/health_checks/simple_abstract_check.rb index f5026171ba4..96945ce5b20 100644 --- a/lib/gitlab/health_checks/simple_abstract_check.rb +++ b/lib/gitlab/health_checks/simple_abstract_check.rb @@ -5,7 +5,7 @@ module Gitlab def readiness check_result = check - if is_successful?(check_result) + if successful?(check_result) HealthChecks::Result.new(true) elsif check_result.is_a?(Timeout::Error) HealthChecks::Result.new(false, "#{human_name} check timed out") @@ -16,10 +16,10 @@ module Gitlab def metrics result, elapsed = with_timing(&method(:check)) - Rails.logger.error("#{human_name} check returned unexpected result #{result}") unless is_successful?(result) + Rails.logger.error("#{human_name} check returned unexpected result #{result}") unless successful?(result) [ metric("#{metric_prefix}_timeout", result.is_a?(Timeout::Error) ? 1 : 0), - metric("#{metric_prefix}_success", is_successful?(result) ? 1 : 0), + metric("#{metric_prefix}_success", successful?(result) ? 1 : 0), metric("#{metric_prefix}_latency_seconds", elapsed) ] end @@ -30,7 +30,7 @@ module Gitlab raise NotImplementedError end - def is_successful?(result) + def successful?(result) raise NotImplementedError end |