diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-07 12:08:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-07 12:08:54 +0300 |
commit | dfa6eac07553d5a3f254ee904e4298bd666b410f (patch) | |
tree | a14e04cf628bf1bd28a0c95ed6261461605cfe2e /app/services/bulk_imports | |
parent | 4be549b5ebd354c69fcd2a09e2a2f642490612cf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/bulk_imports')
3 files changed, 0 insertions, 24 deletions
diff --git a/app/services/bulk_imports/batched_relation_export_service.rb b/app/services/bulk_imports/batched_relation_export_service.rb index 778510f2e35..c7c01c80fbf 100644 --- a/app/services/bulk_imports/batched_relation_export_service.rb +++ b/app/services/bulk_imports/batched_relation_export_service.rb @@ -26,8 +26,6 @@ module BulkImports start_export! export.batches.destroy_all # rubocop: disable Cop/DestroyAll enqueue_batch_exports - rescue StandardError => e - fail_export!(e) ensure FinishBatchedRelationExportWorker.perform_async(export.id) end @@ -81,11 +79,5 @@ module BulkImports def find_or_create_batch(batch_number) export.batches.find_or_create_by!(batch_number: batch_number) # rubocop:disable CodeReuse/ActiveRecord end - - def fail_export!(exception) - Gitlab::ErrorTracking.track_exception(exception, portable_id: portable.id, portable_type: portable.class.name) - - export.update!(status_event: 'fail_op', error: exception.message.truncate(255)) - end end end diff --git a/app/services/bulk_imports/relation_batch_export_service.rb b/app/services/bulk_imports/relation_batch_export_service.rb index 20795de54f9..3f98d49aa1b 100644 --- a/app/services/bulk_imports/relation_batch_export_service.rb +++ b/app/services/bulk_imports/relation_batch_export_service.rb @@ -19,8 +19,6 @@ module BulkImports upload_compressed_file finish_batch! - rescue StandardError => e - fail_batch!(e) ensure FileUtils.remove_entry(export_path) end @@ -72,12 +70,6 @@ module BulkImports batch.update!(status_event: 'finish', objects_count: exported_objects_count, error: nil) end - def fail_batch!(exception) - Gitlab::ErrorTracking.track_exception(exception, portable_id: portable.id, portable_type: portable.class.name) - - batch.update!(status_event: 'fail_op', error: exception.message.truncate(255)) - end - def exported_filepath File.join(export_path, exported_filename) end diff --git a/app/services/bulk_imports/relation_export_service.rb b/app/services/bulk_imports/relation_export_service.rb index 91640496440..6db5ef3e9ec 100644 --- a/app/services/bulk_imports/relation_export_service.rb +++ b/app/services/bulk_imports/relation_export_service.rb @@ -42,8 +42,6 @@ module BulkImports yield export finish_export!(export) - rescue StandardError => e - fail_export!(export, e) end def export_service @@ -87,12 +85,6 @@ module BulkImports export.update!(status_event: 'finish', batched: false, error: nil) end - def fail_export!(export, exception) - Gitlab::ErrorTracking.track_exception(exception, portable_id: portable.id, portable_type: portable.class.name) - - export&.update(status_event: 'fail_op', error: exception.class, batched: false) - end - def exported_filepath File.join(export_path, export_service.exported_filename) end |