Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/validate_puma.rb')
-rw-r--r--config/initializers/validate_puma.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/config/initializers/validate_puma.rb b/config/initializers/validate_puma.rb
index bce9ddb9a66..c4516914018 100644
--- a/config/initializers/validate_puma.rb
+++ b/config/initializers/validate_puma.rb
@@ -1,13 +1,11 @@
# frozen_string_literal: true
-def allow_single_mode?
- return false if Gitlab.com?
-
- Gitlab::Utils.to_boolean(ENV['PUMA_SKIP_CLUSTER_VALIDATION'])
+def max_puma_workers
+ Puma.cli_config.options[:workers].to_i
end
-if Gitlab::Runtime.puma? && ::Puma.cli_config.options[:workers].to_i == 0
- return if allow_single_mode?
+if Gitlab::Runtime.puma? && max_puma_workers == 0
+ raise 'Puma is only supported in Clustered mode (workers > 0)' if Gitlab.com?
- raise 'Puma is only supported in Cluster-mode: workers > 0'
+ warn 'WARNING: Puma is running in Single mode (workers = 0). Some features may not work. Please refer to https://gitlab.com/groups/gitlab-org/-/epics/5303 for info.'
end