instance method
around_perform
Ruby on Rails 5.2.8.1
Since v4.2.9Signature
around_perform(*filters, &blk)
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
Parameters
-
filtersrest -
blkblock
Source
# File activejob/lib/active_job/callbacks.rb, line 91
def around_perform(*filters, &blk)
set_callback(:perform, :around, *filters, &blk)
end
Defined in activejob/lib/active_job/callbacks.rb line 91
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveJob::Callbacks::ClassMethods