Skip to content
Snippets Groups Projects
Commit c90effd8 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov
Browse files

Clean prometheus dir only for master process

parent debc497d
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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('/')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment