Commit a23c2c63 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'ashmckenzie/rails-server-puma-fix' into 'master'

Check Puma.respond_to?(:cli_config) first

See merge request gitlab-org/gitlab!54647
parents 8824d0e6 59f14e1e
# frozen_string_literal: true
def max_puma_workers
Puma.cli_config.options[:workers].to_i
end
if Gitlab::Runtime.puma? && !Gitlab::Runtime.puma_in_clustered_mode?
raise 'Puma is only supported in Clustered mode (workers > 0)' if Gitlab.com?
......
......@@ -82,7 +82,10 @@ module Gitlab
end
def puma_in_clustered_mode?
puma? && Puma.cli_config.options[:workers].to_i > 0
return unless puma?
return unless Puma.respond_to?(:cli_config)
Puma.cli_config.options[:workers].to_i > 0
end
def max_threads
......
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