diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 12:09:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-17 12:09:20 +0000 |
commit | b84eeb256c4a780d902faee1f99ca9a711b3214a (patch) | |
tree | 32918aadbea9210eace50efbce9afbfb8cd3ba84 /lib/gitlab/runtime.rb | |
parent | 53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (diff) | |
download | gitlab-ce-b84eeb256c4a780d902faee1f99ca9a711b3214a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r-- | lib/gitlab/runtime.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb index 3f6361c7276..bf579dd3b77 100644 --- a/lib/gitlab/runtime.rb +++ b/lib/gitlab/runtime.rb @@ -78,12 +78,16 @@ module Gitlab end def max_threads + main_thread = 1 + if puma? - Puma.cli_config.options[:max_threads] + Puma.cli_config.options[:max_threads] + main_thread elsif sidekiq? - Sidekiq.options[:concurrency] + # An extra thread for the poller in Sidekiq Cron: + # https://github.com/ondrejbartas/sidekiq-cron#under-the-hood + Sidekiq.options[:concurrency] + main_thread + 1 else - 1 + main_thread end end end |