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

validate_puma.rb « initializers « config - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bce9ddb9a668b6e72ad53a6e3441b9b47e482c7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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