summaryrefslogtreecommitdiff
path: root/lib/gitlab/import_export/statistics_restorer.rb
blob: 3fafb01c37c59d87853d54ef4e25cfc93cb00ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  module ImportExport
    class StatisticsRestorer
      def initialize(project:, shared:)
        @project = project
        @shared = shared
      end

      def restore
        @project.statistics.refresh!
      rescue => e
        @shared.error(e)
        false
      end
    end
  end
end