diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 18:07:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-06 18:07:44 +0000 |
commit | e1867c38fc5a4b931b4b2256d4909182e94f1051 (patch) | |
tree | 3047b637f7f9a31e74c62d3fe054b24c95e3534e /lib/api/projects_relation_builder.rb | |
parent | 63894d59abd34f76f399d755012cdcd32c5b1103 (diff) | |
download | gitlab-ce-e1867c38fc5a4b931b4b2256d4909182e94f1051.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/projects_relation_builder.rb')
-rw-r--r-- | lib/api/projects_relation_builder.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/api/projects_relation_builder.rb b/lib/api/projects_relation_builder.rb deleted file mode 100644 index 263468c9aa6..00000000000 --- a/lib/api/projects_relation_builder.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -module API - module ProjectsRelationBuilder - extend ActiveSupport::Concern - - class_methods do - def prepare_relation(projects_relation, options = {}) - projects_relation = preload_relation(projects_relation, options) - execute_batch_counting(projects_relation) - projects_relation - end - - def preload_relation(projects_relation, options = {}) - projects_relation - end - - def forks_counting_projects(projects_relation) - projects_relation - end - - def batch_forks_counting(projects_relation) - ::Projects::BatchForksCountService.new(forks_counting_projects(projects_relation)).refresh_cache - end - - def batch_open_issues_counting(projects_relation) - ::Projects::BatchOpenIssuesCountService.new(projects_relation).refresh_cache - end - - def execute_batch_counting(projects_relation) - batch_forks_counting(projects_relation) - batch_open_issues_counting(projects_relation) - end - end - end -end |