diff options
Diffstat (limited to 'config/initializers/validate_puma.rb')
-rw-r--r-- | config/initializers/validate_puma.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/initializers/validate_puma.rb b/config/initializers/validate_puma.rb index ac5678c4b5a..bce9ddb9a66 100644 --- a/config/initializers/validate_puma.rb +++ b/config/initializers/validate_puma.rb @@ -1,5 +1,13 @@ # frozen_string_literal: true +def allow_single_mode? + return false if Gitlab.com? + + Gitlab::Utils.to_boolean(ENV['PUMA_SKIP_CLUSTER_VALIDATION']) +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 |