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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 13:34:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 13:34:06 +0300
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /config/initializers/validate_puma.rb
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
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