Class: Bulkrax::DeleteJob
Instance Method Summary
collapse
Instance Method Details
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/jobs/bulkrax/delete_job.rb', line 7
def perform(entry, importer_run)
user = importer_run.importer.user
entry.factory.delete(user)
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))
rescue => e
entry.set_status_info(e)
raise
end
|