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-02-17 15:09:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 15:09:20 +0300
commitb84eeb256c4a780d902faee1f99ca9a711b3214a (patch)
tree32918aadbea9210eace50efbce9afbfb8cd3ba84 /lib/gitlab/runtime.rb
parent53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (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, 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