Class: Gitlab::GithubImport::Importer::IssuesImporter
- Inherits:
-
Object
- Object
- Gitlab::GithubImport::Importer::IssuesImporter
show all
- Includes:
- ParallelScheduling
- Defined in:
- lib/gitlab/github_import/importer/issues_importer.rb
Constant Summary
ParallelScheduling::ALREADY_IMPORTED_CACHE_KEY, ParallelScheduling::JOB_WAITER_CACHE_KEY, ParallelScheduling::JOB_WAITER_REMAINING_CACHE_KEY
Instance Attribute Summary
#already_imported_cache_key, #client, #job_waiter_cache_key, #job_waiter_remaining_cache_key, #page_counter, #project
Instance Method Summary
collapse
#abort_on_failure, #already_imported?, #each_object_to_import, #execute, #mark_as_imported, #parallel?, #parallel_import, #sequential_import, #spread_parallel_import
#parallel_import_batch
Constructor Details
#initialize(project, client, parallel: true) ⇒ IssuesImporter
Returns a new instance of IssuesImporter.
9
10
11
12
13
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 9
def initialize(project, client, parallel: true)
super
@work_item_type_id = ::WorkItems::Type.default_issue_type.id
end
|
Instance Method Details
#collection_method ⇒ Object
31
32
33
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 31
def collection_method
:issues
end
|
#collection_options ⇒ Object
39
40
41
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 39
def collection_options
{ state: 'all', sort: 'created', direction: 'asc' }
end
|
#id_for_already_imported_cache(issue) ⇒ Object
35
36
37
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 35
def id_for_already_imported_cache(issue)
issue[:number]
end
|
#increment_object_counter?(object) ⇒ Boolean
43
44
45
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 43
def increment_object_counter?(object)
object[:pull_request].nil?
end
|
#object_type ⇒ Object
27
28
29
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 27
def object_type
:issue
end
|
#representation_class ⇒ Object
19
20
21
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 19
def representation_class
Representation::Issue
end
|
#sidekiq_worker_class ⇒ Object
23
24
25
|
# File 'lib/gitlab/github_import/importer/issues_importer.rb', line 23
def sidekiq_worker_class
ImportIssueWorker
end
|