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>2022-03-18 23:02:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-03-18 23:02:30 +0300
commit41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch)
tree9c8d89a8624828992f06d892cd2f43818ff5dcc8 /lib/gitlab/runtime.rb
parent0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff)
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'lib/gitlab/runtime.rb')
-rw-r--r--lib/gitlab/runtime.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/gitlab/runtime.rb b/lib/gitlab/runtime.rb
index 574e05658bc..5b1341207fd 100644
--- a/lib/gitlab/runtime.rb
+++ b/lib/gitlab/runtime.rb
@@ -65,12 +65,15 @@ module Gitlab
!!defined?(::Rails::Command::RunnerCommand)
end
- def web_server?
- puma?
+ # Whether we are executing in an actual application context i.e. Puma or Sidekiq.
+ def application?
+ puma? || sidekiq?
end
+ # Whether we are executing in a multi-threaded environment. For now this is equivalent
+ # to meaning Puma or Sidekiq, but this could change in the future.
def multi_threaded?
- puma? || sidekiq?
+ application?
end
def puma_in_clustered_mode?
@@ -94,7 +97,7 @@ module Gitlab
threads += Sidekiq.options[:concurrency] + 2
end
- if web_server?
+ if puma?
threads += Gitlab::ActionCable::Config.worker_pool_size
end