Class: Gitlab::GithubImport::Importer::PullRequests::AllMergedByImporter
- Inherits:
-
Object
- Object
- Gitlab::GithubImport::Importer::PullRequests::AllMergedByImporter
show all
- Includes:
- ParallelScheduling
- Defined in:
- lib/gitlab/github_import/importer/pull_requests/all_merged_by_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?, #collection_options, #execute, #increment_object_counter?, #initialize, #mark_as_imported, #parallel?, #parallel_import, #sequential_import, #spread_parallel_import
#parallel_import_batch
Instance Method Details
#collection_method ⇒ Object
22
23
24
|
# File 'lib/gitlab/github_import/importer/pull_requests/all_merged_by_importer.rb', line 22
def collection_method
:pull_requests_merged_by
end
|
#each_object_to_import ⇒ Object
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/gitlab/github_import/importer/pull_requests/all_merged_by_importer.rb', line 34
def each_object_to_import
merge_requests_to_import.find_each do |merge_request|
Gitlab::GithubImport::ObjectCounter.increment(project, object_type, :fetched)
pull_request = client.pull_request(project.import_source, merge_request.iid)
yield(pull_request)
mark_as_imported(merge_request)
end
end
|
#id_for_already_imported_cache(merge_request) ⇒ Object
30
31
32
|
# File 'lib/gitlab/github_import/importer/pull_requests/all_merged_by_importer.rb', line 30
def id_for_already_imported_cache(merge_request)
merge_request.id
end
|
#importer_class ⇒ Object
10
11
12
|
# File 'lib/gitlab/github_import/importer/pull_requests/all_merged_by_importer.rb', line 10
def importer_class
MergedByImporter
end
|
#object_type ⇒ Object
26
27
28
|
# File 'lib/gitlab/github_import/importer/pull_requests/all_merged_by_importer.rb', line 26
def object_type
:pull_request_merged_by
end
|
#representation_class ⇒ Object
#sidekiq_worker_class ⇒ Object