Class: Gitlab::BitbucketImport::AdvanceStageWorker
- Inherits:
-
Object
- Object
- Gitlab::BitbucketImport::AdvanceStageWorker
- Includes:
- ApplicationWorker, Import::AdvanceStage
- Defined in:
- app/workers/gitlab/bitbucket_import/advance_stage_worker.rb
Overview
AdvanceStageWorker is a worker used by the BitBucket Importer to wait for a number of jobs to complete, without blocking a thread. Once all jobs have been completed this worker will advance the import process to the next stage.
Constant Summary collapse
- STAGES =
The known importer stages and their corresponding Sidekiq workers.
{ issues: Stage::ImportIssuesWorker, finish: Stage::FinishImportWorker }.freeze
Constants included from Import::AdvanceStage
Import::AdvanceStage::AdvanceStageTimeoutError, Import::AdvanceStage::BLOCKING_WAIT_TIME, Import::AdvanceStage::INTERVAL, Import::AdvanceStage::TIMEOUT_DURATION
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_DATA_CONSISTENCY, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Method Summary collapse
Methods included from Import::AdvanceStage
Methods included from Loggable
Methods included from SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#find_import_state(id) ⇒ Object
31 32 33 |
# File 'app/workers/gitlab/bitbucket_import/advance_stage_worker.rb', line 31 def find_import_state(id) ProjectImportState.find(id) end |
#find_import_state_jid(project_id) ⇒ Object
27 28 29 |
# File 'app/workers/gitlab/bitbucket_import/advance_stage_worker.rb', line 27 def find_import_state_jid(project_id) ProjectImportState.jid_by(project_id: project_id, status: :started) end |