debian-mirror-gitlab/app/services/projects/update_statistics_service.rb
2020-06-23 00:09:42 +05:30

20 lines
368 B
Ruby

# frozen_string_literal: true
module Projects
class UpdateStatisticsService < BaseService
def execute
return unless project
Gitlab::AppLogger.info("Updating statistics for project #{project.id}")
project.statistics.refresh!(only: statistics.map(&:to_sym))
end
private
def statistics
params[:statistics]
end
end
end