Ai
1 Star 0 Fork 0

skipmaple/gitlab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
config.ru 855 Bytes
一键复制 编辑 原始数据 按行查看 历史
# frozen_string_literal: true
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
def master_process?
Prometheus::PidProvider.worker_id == 'puma_master'
end
warmup do |app|
# The following is necessary to ensure stale Prometheus metrics don't accumulate over time.
# It needs to be done as early as here to ensure metrics files aren't deleted.
# After we hit our app in `warmup`, first metrics and corresponding files already being created,
# for example in `lib/gitlab/metrics/requests_rack_middleware.rb`.
Prometheus::CleanupMultiprocDirService.new.execute if master_process?
client = Rack::MockRequest.new(app)
client.get('/')
end
map ENV['RAILS_RELATIVE_URL_ROOT'].presence || "/" do
use Gitlab::Middleware::ReleaseEnv
run Gitlab::Application
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/skipmaple/gitlab.git
git@gitee.com:skipmaple/gitlab.git
skipmaple
gitlab
gitlab
master

搜索帮助