method

after_discard

after_discard(&blk)
public

A block to run when a job is about to be discarded for any reason.

Example

class WorkJob < ActiveJob::Base
  after_discard do |job, exception|
    ExceptionNotifier.report(exception)
  end

  ...

end