Sha256: 890733e4d93b3953c5de2a5dcfad3cb0ddab6d707428f7fb063c5f8d70e90fd2
Contents?: true
Size: 643 Bytes
Versions: 24
Compression:
Stored size: 643 Bytes
Contents
# frozen_string_literal: true module Bulkrax class DeleteWorkJob < ApplicationJob queue_as :import # rubocop:disable Rails/SkipsModelValidations def perform(entry, importer_run) work = entry.factory.find work&.delete ImporterRun.find(importer_run.id).increment!(:deleted_records) ImporterRun.find(importer_run.id).decrement!(:enqueued_records) entry.save! entry.importer.current_run = ImporterRun.find(importer_run.id) entry.importer.record_status entry.status_info("Deleted", ImporterRun.find(importer_run.id)) end # rubocop:enable Rails/SkipsModelValidations end end
Version data entries
24 entries across 24 versions & 1 rubygems