2018-11-16 19:37:17 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-19 07:02:57 -04:00
|
|
|
module Gitlab
|
|
|
|
module ImportExport
|
|
|
|
class UploadsSaver
|
2022-04-06 11:08:23 -04:00
|
|
|
include DurationMeasuring
|
|
|
|
|
2016-05-19 07:02:57 -04:00
|
|
|
def initialize(project:, shared:)
|
|
|
|
@project = project
|
|
|
|
@shared = shared
|
|
|
|
end
|
|
|
|
|
|
|
|
def save
|
2022-04-06 11:08:23 -04:00
|
|
|
with_duration_measuring do
|
|
|
|
Gitlab::ImportExport::UploadsManager.new(
|
|
|
|
project: @project,
|
|
|
|
shared: @shared
|
|
|
|
).save
|
|
|
|
end
|
2021-04-26 08:09:44 -04:00
|
|
|
rescue StandardError => e
|
2016-05-19 09:37:21 -04:00
|
|
|
@shared.error(e)
|
2016-05-19 07:02:57 -04:00
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|