Skip to content
Snippets Groups Projects
Commit 007a96ab authored by Kapil Patel's avatar Kapil Patel
Browse files

Refactor some code

parent 70e22791
No related branches found
No related tags found
2 merge requests!115Tombstone not available for dataset,!930.3 release
Pipeline #5836 failed
......@@ -59,7 +59,8 @@ module Bulkrax
create_relationships
pending_relationships.each(&:destroy)
rescue ::StandardError => e
reschedule({ parent_identifier: parent_identifier, importer_run_id: importer_run_id })
parent_entry ? parent_entry.status_info(e) : child_entry.status_info(e)
Bulkrax::ImporterRun.find(importer_run_id).increment!(:failed_relationships)
end
private
......
......@@ -17,7 +17,7 @@ class IngestJob < Hyrax::ApplicationJob
if wrapper.file_set.parent_works.nil?
return reschedule(wrapper)
elsif wrapper.file_set.for_complex_type == 'experiment'
elsif wrapper.file_set.for_complex_type == 'CrcDataset'
wrapper.ingest_file
elsif wrapper.file_set.for_complex_type == 'ComplexSubject'
wrapper.ingest_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment