diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 15:06:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 15:06:33 +0000 |
commit | 90a06a20be61bb6d48d77746091492831153e075 (patch) | |
tree | bdba99289605f8b5acf12159d02aeb23f8690202 /lib/gitlab/metrics/exporter | |
parent | 84a0e65ac88c7a3db86a0e4347606ba093490bef (diff) | |
download | gitlab-ce-90a06a20be61bb6d48d77746091492831153e075.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/metrics/exporter')
-rw-r--r-- | lib/gitlab/metrics/exporter/web_exporter.rb | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/lib/gitlab/metrics/exporter/web_exporter.rb b/lib/gitlab/metrics/exporter/web_exporter.rb index 3940f6fa155..b6a27d8556a 100644 --- a/lib/gitlab/metrics/exporter/web_exporter.rb +++ b/lib/gitlab/metrics/exporter/web_exporter.rb @@ -20,6 +20,10 @@ module Gitlab def initialize super + # DEPRECATED: + # these `readiness_checks` are deprecated + # as presenting no value in a way how we run + # application: https://gitlab.com/gitlab-org/gitlab/issues/35343 self.readiness_checks = [ WebExporter::ExporterCheck.new(self), Gitlab::HealthChecks::PumaCheck, @@ -35,6 +39,10 @@ module Gitlab File.join(Rails.root, 'log', 'web_exporter.log') end + def mark_as_not_running! + @running = false + end + private def start_working @@ -43,24 +51,9 @@ module Gitlab end def stop_working - @running = false - wait_in_blackout_period if server && thread.alive? + mark_as_not_running! super end - - def wait_in_blackout_period - return unless blackout_seconds > 0 - - @server.logger.info( - message: 'starting blackout...', - duration_s: blackout_seconds) - - sleep(blackout_seconds) - end - - def blackout_seconds - settings['blackout_seconds'].to_i - end end end end |