method
around_perform
v4.2.7 -
Show latest stable
- Class:
ActiveJob::Callbacks::ClassMethods
around_perform(*filters, &blk)public
Defines a callback that will get called around the job’s perform method.
class VideoProcessJob < ActiveJob::Base queue_as :default around_perform do |job, block| UserMailer.notify_video_started_processing(job.arguments.first) block.call UserMailer.notify_video_processed(job.arguments.first) end def perform(video_id) Video.find(video_id).process end end