diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 03:08:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 03:08:41 +0300 |
commit | e40710ab8a30f36d7c82d7d6497033291840eec9 (patch) | |
tree | aea450b24cb1bd8023c1d297e4f01de4e88926b2 /app | |
parent | 51612d3ef5be853289008694c40973b479e8547c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/dashboard/projects_controller.rb | 7 | ||||
-rw-r--r-- | app/workers/all_queues.yml | 2 | ||||
-rw-r--r-- | app/workers/remove_unreferenced_lfs_objects_worker.rb | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb index d5ccec28fdd..039991e07a2 100644 --- a/app/controllers/dashboard/projects_controller.rb +++ b/app/controllers/dashboard/projects_controller.rb @@ -66,7 +66,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController @total_user_projects_count = ProjectsFinder.new(params: { non_public: true }, current_user: current_user).execute @total_starred_projects_count = ProjectsFinder.new(params: { starred: true }, current_user: current_user).execute - finder_params[:use_cte] = Feature.enabled?(:use_cte_for_projects_finder, default_enabled: true) + finder_params[:use_cte] = true if use_cte_for_finder? projects = ProjectsFinder .new(params: finder_params, current_user: current_user) @@ -79,6 +79,11 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController end # rubocop: enable CodeReuse/ActiveRecord + def use_cte_for_finder? + # The starred action loads public projects, which causes the CTE to be less efficient + action_name == 'index' && Feature.enabled?(:use_cte_for_projects_finder, default_enabled: true) + end + def load_events projects = load_projects(params.merge(non_public: true)) diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index 7de237edd36..c93c312438b 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -160,7 +160,7 @@ :resource_boundary: :cpu :weight: 1 - :name: cronjob:remove_unreferenced_lfs_objects - :feature_category: :source_code_management + :feature_category: :git_lfs :has_external_dependencies: :latency_sensitive: :resource_boundary: :unknown diff --git a/app/workers/remove_unreferenced_lfs_objects_worker.rb b/app/workers/remove_unreferenced_lfs_objects_worker.rb index 486f8f12014..b2d2223c64d 100644 --- a/app/workers/remove_unreferenced_lfs_objects_worker.rb +++ b/app/workers/remove_unreferenced_lfs_objects_worker.rb @@ -4,7 +4,7 @@ class RemoveUnreferencedLfsObjectsWorker include ApplicationWorker include CronjobQueue # rubocop:disable Scalability/CronWorkerContext - feature_category :source_code_management + feature_category :git_lfs def perform LfsObject.destroy_unreferenced |