debian-mirror-gitlab/config/initializers/diagnostic_reports.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
409 B
Ruby
Raw Normal View History

2022-08-27 11:52:29 +05:30
# frozen_string_literal: true
return unless Gitlab::Utils.to_boolean(ENV['GITLAB_DIAGNOSTIC_REPORTS_ENABLED'])
# Any actions beyond this check should only execute outside of tests,
# when running in application context (i.e. not in the Rails console or rspec)
return unless Gitlab::Runtime.application?
Gitlab::Cluster::LifecycleEvents.on_worker_start do
Gitlab::Memory::ReportsDaemon.instance.start
end