Class: Gitlab::JiraImport::AdvanceStageWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker, Import::AdvanceStage, QueueOptions
Defined in:
app/workers/gitlab/jira_import/advance_stage_worker.rb

Overview

rubocop:disable Scalability/IdempotentWorker

Constant Summary collapse

STAGES =

The known importer stages and their corresponding Sidekiq workers.

{
  labels: Gitlab::JiraImport::Stage::ImportLabelsWorker,
  issues: Gitlab::JiraImport::Stage::ImportIssuesWorker,
  attachments: Gitlab::JiraImport::Stage::ImportAttachmentsWorker,
  notes: Gitlab::JiraImport::Stage::ImportNotesWorker,
  finish: Gitlab::JiraImport::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

Loggable::ANONYMOUS

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

#perform, #wait_for_jobs

Methods included from Loggable

#build_structured_payload

Methods included from SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Instance Method Details

#find_import_state(id) ⇒ Object



27
28
29
# File 'app/workers/gitlab/jira_import/advance_stage_worker.rb', line 27

def find_import_state(id)
  JiraImportState.find(id)
end

#find_import_state_jid(project_id) ⇒ Object



23
24
25
# File 'app/workers/gitlab/jira_import/advance_stage_worker.rb', line 23

def find_import_state_jid(project_id)
  JiraImportState.jid_by(project_id: project_id, status: :started)
end