debian-mirror-gitlab/app/workers/gitlab/github_import/stage/import_notes_worker.rb
2020-04-08 14:13:33 +05:30

28 lines
702 B
Ruby

# frozen_string_literal: true
module Gitlab
module GithubImport
module Stage
class ImportNotesWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
include GithubImport::Queue
include StageMethods
# client - An instance of Gitlab::GithubImport::Client.
# project - An instance of Project.
def import(client, project)
waiter = Importer::NotesImporter
.new(project, client)
.execute
AdvanceStageWorker.perform_async(
project.id,
{ waiter.key => waiter.jobs_remaining },
:lfs_objects
)
end
end
end
end
end