module ActiveJob::Callbacks::ClassMethods

def around_perform(*filters, &blk)


end
end
"Hello World!"
def perform

end
puts value # => "Hello World!"
value = block.call
around_perform do |job, block|
class VideoProcessJob < ActiveJob::Base

You can access the return value of the job only if the execution wasn't halted.

end
end
Video.find(video_id).process
def perform(video_id)

end
UserMailer.notify_video_processed(job.arguments.first)
block.call
UserMailer.notify_video_started_processing(job.arguments.first)
around_perform do |job, block|

queue_as :default
class VideoProcessJob < ActiveJob::Base

Defines a callback that will get called around the job's perform method.
def around_perform(*filters, &blk)
  set_callback(:perform, :around, *filters, &blk)
end