Class: Gitlab::ImportExport::StatisticsRestorer

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/import_export/statistics_restorer.rb

Instance Method Summary collapse

Constructor Details

#initialize(project:, shared:) ⇒ StatisticsRestorer

Returns a new instance of StatisticsRestorer.



6
7
8
9
# File 'lib/gitlab/import_export/statistics_restorer.rb', line 6

def initialize(project:, shared:)
  @project = project
  @shared = shared
end

Instance Method Details

#restoreObject



11
12
13
14
15
16
# File 'lib/gitlab/import_export/statistics_restorer.rb', line 11

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