Commit d69bfbda authored by 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
parents 150f8e4d 6b1696db
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment