Class: Projects::BatchForksCountService

Inherits:
BatchCountService show all
Defined in:
app/services/projects/batch_forks_count_service.rb

Instance Method Summary collapse

Methods inherited from BatchCountService

#initialize, #project_ids, #refresh_cache_and_retrieve_data

Constructor Details

This class inherits a constructor from Projects::BatchCountService

Instance Method Details

#count_serviceObject

rubocop: enable CodeReuse/ActiveRecord



16
17
18
# File 'app/services/projects/batch_forks_count_service.rb', line 16

def count_service
  ::Projects::ForksCountService
end

#global_countObject

rubocop: disable CodeReuse/ActiveRecord



9
10
11
12
13
# File 'app/services/projects/batch_forks_count_service.rb', line 9

def global_count
  @global_count ||= count_service.query(project_ids)
                 .group(:forked_from_project_id)
                 .count
end