0ab89d8e36
Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
19 lines
400 B
Ruby
19 lines
400 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Projects
|
|
class UpdateStatisticsService < BaseService
|
|
def execute
|
|
return unless project
|
|
|
|
Rails.logger.info("Updating statistics for project #{project.id}") # rubocop:disable Gitlab/RailsLogger
|
|
|
|
project.statistics.refresh!(only: statistics.map(&:to_sym))
|
|
end
|
|
|
|
private
|
|
|
|
def statistics
|
|
params[:statistics]
|
|
end
|
|
end
|
|
end
|