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>2020-01-16 06:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-16 06:08:47 +0300
commit08ed6a867b690a04fe7a74c9ba697cf18f6107d7 (patch)
tree9561a9aeee9a57cec168b143a76e6f65fd92ae0b /lib/gitlab/runtime.rb
parentb0f27742e78a4aa4208c271536b6b9d84c53b49e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r--lib/gitlab/runtime.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb
index c9e5d71c107..97f7a8e2800 100644
--- a/lib/gitlab/runtime.rb
+++ b/lib/gitlab/runtime.rb
@@ -67,6 +67,16 @@ module Gitlab
def process_name
File.basename($0)
end
+
+ def max_threads
+ if puma?
+ Puma.cli_config.options[:max_threads]
+ elsif sidekiq?
+ Sidekiq.options[:concurrency]
+ else
+ 1
+ end
+ end
end
end
end