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

import_issues_notes_worker.rb « stage « bitbucket_import « gitlab « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbd67099086a816871ed60b924f168f95f561c49 (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
29
30
# frozen_string_literal: true

module Gitlab
  module BitbucketImport
    module Stage
      class ImportIssuesNotesWorker # rubocop:disable Scalability/IdempotentWorker
        include StageMethods

        private

        # project - An instance of Project.
        def import(project)
          waiter = importer_class.new(project).execute

          project.import_state.refresh_jid_expiration

          AdvanceStageWorker.perform_async(
            project.id,
            { waiter.key => waiter.jobs_remaining },
            :lfs_objects
          )
        end

        def importer_class
          Importers::IssuesNotesImporter
        end
      end
    end
  end
end