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.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/initializers/validate_puma.rb b/config/initializers/validate_puma.rb
index ac5678c4b5a..9723765d00f 100644
--- a/config/initializers/validate_puma.rb
+++ b/config/initializers/validate_puma.rb
@@ -1,5 +1,11 @@
# frozen_string_literal: true
-if Gitlab::Runtime.puma? && ::Puma.cli_config.options[:workers].to_i == 0
- raise 'Puma is only supported in Cluster-mode: workers > 0'
+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?
+
+ 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