Commit c90effd8 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Clean prometheus dir only for master process

parent debc497d
......@@ -29,8 +29,12 @@ def cleanup_prometheus_multiproc_dir
end
end
def master_process?
Prometheus::PidProvider.worker_id.in? %w(unicorn_master puma_master)
end
warmup do |app|
cleanup_prometheus_multiproc_dir
cleanup_prometheus_multiproc_dir if master_process?
client = Rack::MockRequest.new(app)
client.get('/')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment