summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-08 06:09:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-08 06:09:13 +0000
commit0a319374e7784aa5c2d1c30dd832d2a0509edbab (patch)
tree123c5bac601b85d60cbaba541b25aed8c981c529 /config
parent5683a027b79d2236bf9b3d1eb5303075584894d7 (diff)
downloadgitlab-ce-0a319374e7784aa5c2d1c30dd832d2a0509edbab.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/application.rb1
-rw-r--r--config/environments/development.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/environments/test.rb4
-rw-r--r--config/gitlab.yml.example5
-rw-r--r--config/initializers/1_settings.rb6
-rw-r--r--config/initializers/action_cable.rb8
7 files changed, 9 insertions, 19 deletions
diff --git a/config/application.rb b/config/application.rb
index 524827226e7..47f8ca48d91 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -17,6 +17,7 @@ module Gitlab
class Application < Rails::Application
require_dependency Rails.root.join('lib/gitlab')
require_dependency Rails.root.join('lib/gitlab/utils')
+ require_dependency Rails.root.join('lib/gitlab/action_cable/config')
require_dependency Rails.root.join('lib/gitlab/redis/wrapper')
require_dependency Rails.root.join('lib/gitlab/redis/cache')
require_dependency Rails.root.join('lib/gitlab/redis/queues')
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 25d57467060..9d4fc6ba5e9 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -49,8 +49,6 @@ Rails.application.configure do
# Do not log asset requests
config.assets.quiet = true
- config.allow_concurrency = Gitlab::Runtime.multi_threaded?
-
# BetterErrors live shell (REPL) on every stack frame
BetterErrors::Middleware.allow_ip!("127.0.0.1/0")
diff --git a/config/environments/production.rb b/config/environments/production.rb
index c03421040a3..393a274606e 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -77,6 +77,4 @@ Rails.application.configure do
config.action_mailer.raise_delivery_errors = true
config.eager_load = true
-
- config.allow_concurrency = Gitlab::Runtime.multi_threaded?
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index c130eb84baa..e08e2a34ff4 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -54,4 +54,8 @@ Rails.application.configure do
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(nil))
config.log_level = :fatal
end
+
+ # Mount the ActionCable Engine in-app so that we don't have to spawn another Puma
+ # process for feature specs
+ ENV['ACTION_CABLE_IN_APP'] = 'true'
end
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 57296e3ceae..ce22f636184 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -1105,11 +1105,6 @@ production: &base
# host: localhost
# port: 3808
- ## ActionCable settings
- action_cable:
- # Number of threads used to process ActionCable connection callbacks and channel actions
- # worker_pool_size: 4
-
## Monitoring
# Built in monitoring settings
monitoring:
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 8d7d51f1e32..ff7090c3fa3 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -738,12 +738,6 @@ Settings.webpack.dev_server['host'] ||= 'localhost'
Settings.webpack.dev_server['port'] ||= 3808
#
-# ActionCable settings
-#
-Settings['action_cable'] ||= Settingslogic.new({})
-Settings.action_cable['worker_pool_size'] ||= 4
-
-#
# Monitoring settings
#
Settings['monitoring'] ||= Settingslogic.new({})
diff --git a/config/initializers/action_cable.rb b/config/initializers/action_cable.rb
index c549dd45ad9..5530e7d64a2 100644
--- a/config/initializers/action_cable.rb
+++ b/config/initializers/action_cable.rb
@@ -3,11 +3,11 @@
require 'action_cable/subscription_adapter/redis'
Rails.application.configure do
- # We only mount the ActionCable engine in tests where we run it in-app
- # For other environments, we run it on a standalone Puma server
- config.action_cable.mount_path = Rails.env.test? ? '/-/cable' : nil
+ # Mount the ActionCable engine when in-app mode is enabled
+ config.action_cable.mount_path = Gitlab::ActionCable::Config.in_app? ? '/-/cable' : nil
+
config.action_cable.url = Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/-/cable')
- config.action_cable.worker_pool_size = Gitlab.config.action_cable.worker_pool_size
+ config.action_cable.worker_pool_size = Gitlab::ActionCable::Config.worker_pool_size
end
# https://github.com/rails/rails/blob/bb5ac1623e8de08c1b7b62b1368758f0d3bb6379/actioncable/lib/action_cable/subscription_adapter/redis.rb#L18