Welcome to mirror list, hosted at ThFree Co, Russian Federation.

lfs_object_importer.rb « importers « bitbucket_server_import « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 67b8eefc3518881085ec30c2260f50451c74c94d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

module Gitlab
  module BitbucketServerImport
    module Importers
      class LfsObjectImporter
        include Loggable

        def initialize(project, lfs_attributes)
          @project = project
          @lfs_download_object = LfsDownloadObject.new(**lfs_attributes.symbolize_keys)
        end

        def execute
          log_info(import_stage: 'import_lfs_object', message: 'starting', oid: lfs_download_object.oid)

          Projects::LfsPointers::LfsDownloadService.new(project, lfs_download_object).execute

          log_info(import_stage: 'import_lfs_object', message: 'finished', oid: lfs_download_object.oid)
        end

        private

        attr_reader :project, :lfs_download_object
      end
    end
  end
end