Skip to content
代码片段 群组 项目
提交 d69bfbda 编辑于 作者: Kamil Trzciński's avatar Kamil Trzciński
浏览文件

Merge branch 'mk-fix-puma-validation-crash' into 'master'

Fix crash in Puma validation initializer

See merge request gitlab-org/gitlab!52072
No related branches found
No related tags found
无相关合并请求
# frozen_string_literal: true # frozen_string_literal: true
if Gitlab::Runtime.puma? && ::Puma.cli_config.options[:workers].to_i == 0
return if allow_single_mode?
raise 'Puma is only supported in Cluster-mode: workers > 0'
end
def allow_single_mode? def allow_single_mode?
return false if Gitlab.com? return false if Gitlab.com?
Gitlab::Utils.to_boolean(ENV['PUMA_SKIP_CLUSTER_VALIDATION']) Gitlab::Utils.to_boolean(ENV['PUMA_SKIP_CLUSTER_VALIDATION'])
end end
if Gitlab::Runtime.puma? && ::Puma.cli_config.options[:workers].to_i == 0
return if allow_single_mode?
raise 'Puma is only supported in Cluster-mode: workers > 0'
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册