gitlab-org--gitlab-foss/lib/gitlab/import_export/uploads_saver.rb

26 lines
515 B
Ruby

# frozen_string_literal: true
module Gitlab
module ImportExport
class UploadsSaver
include DurationMeasuring
def initialize(project:, shared:)
@project = project
@shared = shared
end
def save
with_duration_measuring do
Gitlab::ImportExport::UploadsManager.new(
project: @project,
shared: @shared
).save
end
rescue StandardError => e
@shared.error(e)
false
end
end
end
end