summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-05 10:13:06 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-05 10:13:06 +0900
commitaf2c51d7ca73e16cdb9a11fff6d097116c7c5324 (patch)
treecd7f07f36e09a357902a262cbb932f25d254a16c /config
parentacfe7ec65c75f65f2f87bf3e8598c1725c9150f4 (diff)
parentf71c497f5da791a35876206255e342a9bb5e49c5 (diff)
downloadgitlab-ce-af2c51d7ca73e16cdb9a11fff6d097116c7c5324.tar.gz
Merge branch 'master-ce' into scheduled-manual-jobs
Diffstat (limited to 'config')
-rw-r--r--config/initializers/sidekiq.rb10
-rw-r--r--config/routes/admin.rb2
-rw-r--r--config/routes/group.rb4
-rw-r--r--config/routes/project.rb3
-rw-r--r--config/routes/user.rb1
5 files changed, 14 insertions, 6 deletions
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index 6c1079faad1..bc6b7aed6aa 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -40,6 +40,10 @@ Sidekiq.configure_server do |config|
ActiveRecord::Base.clear_all_connections!
end
+ if Feature.enabled?(:gitlab_sidekiq_reliable_fetcher)
+ Sidekiq::ReliableFetcher.setup_reliable_fetch!(config)
+ end
+
# Sidekiq-cron: load recurring jobs from gitlab.yml
# UGLY Hack to get nested hash from settingslogic
cron_jobs = JSON.parse(Gitlab.config.cron_jobs.to_json)
@@ -57,10 +61,10 @@ Sidekiq.configure_server do |config|
Gitlab::SidekiqVersioning.install!
- config = Gitlab::Database.config ||
+ db_config = Gitlab::Database.config ||
Rails.application.config.database_configuration[Rails.env]
- config['pool'] = Sidekiq.options[:concurrency]
- ActiveRecord::Base.establish_connection(config)
+ db_config['pool'] = Sidekiq.options[:concurrency]
+ ActiveRecord::Base.establish_connection(db_config)
Rails.logger.debug("Connection Pool size for Sidekiq Server is now: #{ActiveRecord::Base.connection.pool.instance_variable_get('@size')}")
# Avoid autoload issue such as 'Mail::Parsers::AddressStruct'
diff --git a/config/routes/admin.rb b/config/routes/admin.rb
index 7489b01ded6..7cdaa2daa14 100644
--- a/config/routes/admin.rb
+++ b/config/routes/admin.rb
@@ -107,7 +107,7 @@ namespace :admin do
resource :application_settings, only: [:show, :update] do
resources :services, only: [:index, :edit, :update]
get :usage_data
- put :reset_runners_token
+ put :reset_registration_token
put :reset_health_check_token
put :clear_repository_check_states
get :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences
diff --git a/config/routes/group.rb b/config/routes/group.rb
index 893ec8a4e58..602bbe837cf 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -27,7 +27,9 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
as: :group,
constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do
namespace :settings do
- resource :ci_cd, only: [:show], controller: 'ci_cd'
+ resource :ci_cd, only: [:show], controller: 'ci_cd' do
+ put :reset_registration_token
+ end
end
resource :variables, only: [:show, :update]
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 04a270c5cc9..356a509da75 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -366,7 +366,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :discussions, format: :json
end
collection do
- post :bulk_update
+ post :bulk_update
end
end
@@ -438,6 +438,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get :members, to: redirect("%{namespace_id}/%{project_id}/project_members")
resource :ci_cd, only: [:show, :update], controller: 'ci_cd' do
post :reset_cache
+ put :reset_registration_token
end
resource :integrations, only: [:show]
resource :repository, only: [:show], controller: :repository do
diff --git a/config/routes/user.rb b/config/routes/user.rb
index bc7df5e7584..e0ae264e2c0 100644
--- a/config/routes/user.rb
+++ b/config/routes/user.rb
@@ -45,6 +45,7 @@ scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) d
get :contributed, as: :contributed_projects
get :snippets
get :exists
+ get :activity
get '/', to: redirect('%{username}'), as: nil
end