Class: Gitlab::GithubImport::AdvanceStageWorker
- Inherits:
-
Object
- Object
- Gitlab::GithubImport::AdvanceStageWorker
- Includes:
- ApplicationWorker, Import::AdvanceStage
- Defined in:
- app/workers/gitlab/github_import/advance_stage_worker.rb
Overview
AdvanceStageWorker is a worker used by the GitHub 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.
{ pull_requests_merged_by: Stage::ImportPullRequestsMergedByWorker, pull_request_reviews: Stage::ImportPullRequestsReviewsWorker, issues_and_diff_notes: Stage::ImportIssuesAndDiffNotesWorker, notes: Stage::ImportNotesWorker, lfs_objects: Stage::ImportLfsObjectsWorker, finish: Stage::FinishImportWorker }.freeze
Constants included from Import::AdvanceStage
Import::AdvanceStage::BLOCKING_WAIT_TIME, Import::AdvanceStage::INTERVAL
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_DATA_CONSISTENCY, 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 SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#find_import_state(project_id) ⇒ Object
31 32 33 |
# File 'app/workers/gitlab/github_import/advance_stage_worker.rb', line 31 def find_import_state(project_id) ProjectImportState.jid_by(project_id: project_id, status: :started) end |