Commit 59f14e1e authored by Ash McKenzie's avatar Ash McKenzie Committed by Kamil Trzciński

Check Puma.respond_to?(:cli_config) first

parent 3340792d
# 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