Skip to content
代码片段 群组 项目
提交 c90effd8 编辑于 作者: Aleksei Lipniagov's avatar Aleksei Lipniagov
浏览文件

Clean prometheus dir only for master process

上级 debc497d
No related branches found
No related tags found
无相关合并请求
......@@ -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('/')
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册