Class: Projects::ImportExport::WaitRelationExportsWorker
- Inherits:
-
Object
- Object
- Projects::ImportExport::WaitRelationExportsWorker
- Includes:
- ApplicationWorker, ExceptionBacktrace
- Defined in:
- app/workers/projects/import_export/wait_relation_exports_worker.rb
Constant Summary collapse
- INTERVAL =
1.minute
Constants included from ApplicationWorker
ApplicationWorker::LOGGING_EXTRA_KEY, ApplicationWorker::SAFE_PUSH_BULK_LIMIT
Constants included from Gitlab::Loggable
Constants included from WorkerAttributes
WorkerAttributes::DEFAULT_DATA_CONSISTENCY, WorkerAttributes::DEFAULT_DATA_CONSISTENCY_PER_DB, WorkerAttributes::DEFAULT_DEFER_DELAY, WorkerAttributes::LOAD_BALANCED_DATA_CONSISTENCIES, WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_DATA_CONSISTENCIES, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES
Instance Method Summary collapse
Methods included from Gitlab::Loggable
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#perform(project_export_job_id, user_id, after_export_strategy = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/workers/projects/import_export/wait_relation_exports_worker.rb', line 18 def perform(project_export_job_id, user_id, after_export_strategy = {}) @export_job = ProjectExportJob.find(project_export_job_id) return unless @export_job.started? @export_job.update_attribute(:jid, jid) @relation_exports = @export_job.relation_exports if queued_relation_exports.any? || started_relation_exports.any? fail_started_jobs_no_longer_running self.class.perform_in(INTERVAL, project_export_job_id, user_id, after_export_strategy) return end if all_relation_export_finished? ParallelProjectExportWorker.perform_async(project_export_job_id, user_id, after_export_strategy) return end fail_and_notify_user(user_id) end |