diff options
author | Aleksei Lipniagov <alipniagov@gitlab.com> | 2019-08-12 12:49:01 +0300 |
---|---|---|
committer | Aleksei Lipniagov <alipniagov@gitlab.com> | 2019-08-12 13:52:15 +0300 |
commit | c90effd84a2ed93c356b25f80b708f4df33472b0 (patch) | |
tree | 015e1d2ebbfdd21416c5428d8ed049be0469fe07 /config.ru | |
parent | debc497dbb97f2850f559b7053151419c72c4781 (diff) | |
download | gitlab-ce-c90effd84a2ed93c356b25f80b708f4df33472b0.tar.gz |
Clean prometheus dir only for master process
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config.ru b/config.ru index 530d8e32377..f6a7dca0542 100644 --- a/config.ru +++ b/config.ru @@ -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('/') |