Class: Bulkrax::DeleteAndImportJob
Instance Method Summary
collapse
Instance Method Details
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/jobs/bulkrax/delete_and_import_job.rb', line 7
def perform(entry, importer_run)
begin
status = self.class::DELETE_CLASS.perform_now(entry, importer_run)
reimport(entry, importer_run) if status.status_message == "Deleted"
rescue Bulkrax::ObjectFactoryInterface::ObjectNotFoundError
reimport(entry, importer_run)
end
rescue => e
entry.set_status_info(e)
raise
end
|
#reimport(entry, importer_run) ⇒ Object
23
24
25
26
|
# File 'app/jobs/bulkrax/delete_and_import_job.rb', line 23
def reimport(entry, importer_run)
entry = Bulkrax::Entry.find(entry.id)
self.class::IMPORT_CLASS.perform_now(entry.id, importer_run.id)
end
|