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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
515 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-05-19 07:02:57 -04:00
module Gitlab
module ImportExport
class UploadsSaver
include DurationMeasuring
2016-05-19 07:02:57 -04:00
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
2016-05-19 09:37:21 -04:00
@shared.error(e)
2016-05-19 07:02:57 -04:00
false
end
end
end
end