I'm playing with delayed_job and I need to delete all the job with a specified handler value, I tried in this way
class Auction < ActiveRecord::Base
def clean_jobs
Delayed::Job.all.each do |job|
job.delete if job.payload_object.auction_id == id
end
end
end
and it works but I have to go through the entire queue...not cool. How can i work around this? Thank you