You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Hooks section in the Delayed::Job Readme shows how to setup callbacks, but I cannot get it to work and wonder if there is additional configuration required when working with delayed_job_active_record vs the original gem?
class CustomJob < ActiveJob::Base
def perform(params)
puts "I run successfully"
end
def success
puts "but I never run"
end
def after
puts "nor do i"
end
end
The text was updated successfully, but these errors were encountered:
You are using ActiveJob and that is hiding some important details from you. The most important being ActiveJob is running that job not DJ. ActiveJob creates a wrapper job behind the scenes. DJ only executes this wrapper job, everything else is within ActiveJob. You can find out more about ActiveJob callbacks here https://guides.rubyonrails.org/v4.2/active_job_basics.html#callbacks
The Hooks section in the Delayed::Job Readme shows how to setup callbacks, but I cannot get it to work and wonder if there is additional configuration required when working with
delayed_job_active_record
vs the original gem?versions: Rails 4.2.6, delayed_job_active_record 4.1.1
The text was updated successfully, but these errors were encountered: