Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru6
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('/')