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.

16 lines
398 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'])
2022-11-25 23:54:43 +05:30
return unless Gitlab::Runtime.puma?
2022-08-27 11:52:29 +05:30
Gitlab::Cluster::LifecycleEvents.on_worker_start do
Gitlab::Memory::ReportsDaemon.instance.start
end
2023-03-04 22:38:38 +05:30
Gitlab::Cluster::LifecycleEvents.on_worker_stop do
Gitlab::Memory::Reporter.new.run_report(
Gitlab::Memory::Reports::HeapDump.new
)
end