diff options
Diffstat (limited to 'app/workers/gitlab/bitbucket_import/stage/import_issues_notes_worker.rb')
-rw-r--r-- | app/workers/gitlab/bitbucket_import/stage/import_issues_notes_worker.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/app/workers/gitlab/bitbucket_import/stage/import_issues_notes_worker.rb b/app/workers/gitlab/bitbucket_import/stage/import_issues_notes_worker.rb new file mode 100644 index 00000000000..cbd67099086 --- /dev/null +++ b/app/workers/gitlab/bitbucket_import/stage/import_issues_notes_worker.rb @@ -0,0 +1,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 |