Class: Gitlab::BitbucketServerImport::Importers::LfsObjectsImporter
- Inherits:
-
Object
- Object
- Gitlab::BitbucketServerImport::Importers::LfsObjectsImporter
show all
- Includes:
- ParallelScheduling
- Defined in:
- lib/gitlab/bitbucket_server_import/importers/lfs_objects_importer.rb
Constant Summary
ParallelScheduling::ALREADY_PROCESSED_CACHE_KEY, ParallelScheduling::BATCH_SIZE, ParallelScheduling::JOB_WAITER_CACHE_KEY
Instance Attribute Summary
#already_processed_cache_key, #job_waiter_cache_key, #project
Instance Method Summary
collapse
#initialize
Methods included from Loggable
#log_debug, #log_error, #log_info, #log_warn
Instance Method Details
#collection_method ⇒ Object
29
30
31
|
# File 'lib/gitlab/bitbucket_server_import/importers/lfs_objects_importer.rb', line 29
def collection_method
:lfs_objects
end
|
#execute ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/gitlab/bitbucket_server_import/importers/lfs_objects_importer.rb', line 9
def execute
log_info(import_stage: 'import_lfs_objects', message: 'starting')
download_service = Projects::LfsPointers::LfsObjectDownloadListService.new(project)
begin
queue_workers(download_service) if project&.lfs_enabled?
rescue StandardError => e
track_import_failure!(project, exception: e)
end
log_info(import_stage: 'import_lfs_objects', message: 'finished')
job_waiter
end
|
#id_for_already_processed_cache(lfs_download_object) ⇒ Object
33
34
35
|
# File 'lib/gitlab/bitbucket_server_import/importers/lfs_objects_importer.rb', line 33
def id_for_already_processed_cache(lfs_download_object)
lfs_download_object.oid
end
|
#sidekiq_worker_class ⇒ Object
25
26
27
|
# File 'lib/gitlab/bitbucket_server_import/importers/lfs_objects_importer.rb', line 25
def sidekiq_worker_class
ImportLfsObjectWorker
end
|