diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 18:44:42 +0300 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /lib/gitlab/runtime.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r-- | lib/gitlab/runtime.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb index 968ef06b085..b0bcea0ca69 100644 --- a/lib/gitlab/runtime.rb +++ b/lib/gitlab/runtime.rb @@ -26,13 +26,9 @@ module Gitlab if matches.one? matches.first elsif matches.none? - raise UnknownProcessError.new( - "Failed to identify runtime for process #{Process.pid} (#{$0})" - ) + raise UnknownProcessError, "Failed to identify runtime for process #{Process.pid} (#{$0})" else - raise AmbiguousProcessError.new( - "Ambiguous runtime #{matches} for process #{Process.pid} (#{$0})" - ) + raise AmbiguousProcessError, "Ambiguous runtime #{matches} for process #{Process.pid} (#{$0})" end end @@ -91,7 +87,7 @@ module Gitlab def max_threads threads = 1 # main thread - if puma? + if puma? && Puma.respond_to?(:cli_config) threads += Puma.cli_config.options[:max_threads] elsif sidekiq? # An extra thread for the poller in Sidekiq Cron: |