Class: Bulkrax::DeleteJob
Instance Method Summary
collapse
Instance Method Details
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/jobs/bulkrax/delete_job.rb', line 7
def perform(entry, importer_run)
obj = entry.factory.find
obj&.delete
ImporterRun.increment_counter(:deleted_records, importer_run.id)
ImporterRun.decrement_counter(:enqueued_records, importer_run.id)
entry.save!
entry.importer.current_run = ImporterRun.find(importer_run.id)
entry.importer.record_status
entry.set_status_info("Deleted", ImporterRun.find(importer_run.id))
end
|