diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 18:07:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 18:07:52 +0000 |
commit | 6c15c18fa455502bf0b80316390eefde40d42a8a (patch) | |
tree | b42af022a747fd580a09f36b0e60a9f53ed7b25c /lib/gitlab/metrics/prometheus.rb | |
parent | 263f926c770163788f78af03ab69689c94f57360 (diff) | |
download | gitlab-ce-6c15c18fa455502bf0b80316390eefde40d42a8a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/metrics/prometheus.rb')
-rw-r--r-- | lib/gitlab/metrics/prometheus.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gitlab/metrics/prometheus.rb b/lib/gitlab/metrics/prometheus.rb index f7480a8789e..757762499a9 100644 --- a/lib/gitlab/metrics/prometheus.rb +++ b/lib/gitlab/metrics/prometheus.rb @@ -62,10 +62,18 @@ module Gitlab end def error_detected! + set_error!(true) + end + + def clear_errors! + set_error!(false) + end + + def set_error!(status) clear_memoization(:prometheus_metrics_enabled) PROVIDER_MUTEX.synchronize do - @error = true + @error = status end end |