Class: Gitlab::BitbucketServerImport::ParallelImporter
- Inherits:
-
Object
- Object
- Gitlab::BitbucketServerImport::ParallelImporter
- Defined in:
- lib/gitlab/bitbucket_server_import/parallel_importer.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project) ⇒ ParallelImporter
constructor
A new instance of ParallelImporter.
Constructor Details
#initialize(project) ⇒ ParallelImporter
Returns a new instance of ParallelImporter.
18 19 20 |
# File 'lib/gitlab/bitbucket_server_import/parallel_importer.rb', line 18 def initialize(project) @project = project end |
Class Method Details
.async? ⇒ Boolean
6 7 8 |
# File 'lib/gitlab/bitbucket_server_import/parallel_importer.rb', line 6 def self.async? true end |
.imports_repository? ⇒ Boolean
10 11 12 |
# File 'lib/gitlab/bitbucket_server_import/parallel_importer.rb', line 10 def self.imports_repository? true end |
.track_start_import(project) ⇒ Object
14 15 16 |
# File 'lib/gitlab/bitbucket_server_import/parallel_importer.rb', line 14 def self.track_start_import(project) Gitlab::Import::Metrics.new(:bitbucket_server_importer, project).track_start_import end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/gitlab/bitbucket_server_import/parallel_importer.rb', line 22 def execute Gitlab::Import::SetAsyncJid.set_jid(project.import_state) Stage::ImportRepositoryWorker .with_status .perform_async(project.id) true end |