Class: Projects::ImportExport::ParallelProjectExportWorker
- Inherits:
-
Object
- Object
- Projects::ImportExport::ParallelProjectExportWorker
- Includes:
- ApplicationWorker, ExceptionBacktrace
- Defined in:
- app/workers/projects/import_export/parallel_project_export_worker.rb
Constant Summary
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
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'app/workers/projects/import_export/parallel_project_export_worker.rb', line 35 def perform(project_export_job_id, user_id, after_export_strategy = {}) export_job = ProjectExportJob.find(project_export_job_id) return if export_job.finished? export_job.update_attribute(:jid, jid) current_user = User.find(user_id) after_export = build!(after_export_strategy) export_service = ::Projects::ImportExport::ParallelExportService.new(export_job, current_user, after_export) export_service.execute export_job.finish! rescue Gitlab::ImportExport::AfterExportStrategyBuilder::StrategyNotFoundError export_job.fail_op! end |