Class: Gitlab::GithubImport::Importer::Attachments::NotesImporter

Inherits:
BaseImporter
  • Object
show all
Defined in:
lib/gitlab/github_import/importer/attachments/notes_importer.rb

Constant Summary

Constants inherited from BaseImporter

BaseImporter::BATCH_SIZE

Constants included from ParallelScheduling

ParallelScheduling::ALREADY_IMPORTED_CACHE_KEY, ParallelScheduling::JOB_WAITER_CACHE_KEY, ParallelScheduling::JOB_WAITER_REMAINING_CACHE_KEY

Instance Attribute Summary

Attributes included from ParallelScheduling

#already_imported_cache_key, #client, #job_waiter_cache_key, #job_waiter_remaining_cache_key, #page_counter, #project

Instance Method Summary collapse

Methods inherited from BaseImporter

#each_object_to_import, #importer_class, #representation_class

Methods included from ParallelScheduling

#abort_on_failure, #already_imported?, #collection_options, #each_object_to_import, #execute, #importer_class, #increment_object_counter?, #initialize, #mark_as_imported, #parallel?, #parallel_import, #representation_class, #sequential_import, #spread_parallel_import

Methods included from JobDelayCalculator

#parallel_import_batch

Instance Method Details

#collection_methodObject



12
13
14
# File 'lib/gitlab/github_import/importer/attachments/notes_importer.rb', line 12

def collection_method
  :note_attachments
end

#id_for_already_imported_cache(note) ⇒ Object



20
21
22
# File 'lib/gitlab/github_import/importer/attachments/notes_importer.rb', line 20

def id_for_already_imported_cache(note)
  note.id
end

#object_typeObject



16
17
18
# File 'lib/gitlab/github_import/importer/attachments/notes_importer.rb', line 16

def object_type
  :note_attachment
end

#sidekiq_worker_classObject



8
9
10
# File 'lib/gitlab/github_import/importer/attachments/notes_importer.rb', line 8

def sidekiq_worker_class
  ::Gitlab::GithubImport::Attachments::ImportNoteWorker
end