backburner
backburner copied to clipboard
Hook documentation is misleading about the ability to bury a job
The docs for hooks give a couple examples for an on_failure_bury method that goes on to call self.bury. The problem is that self.bury isn't a method and implementing a hook like this will raise NoMethodErrors. bury is a method on a Backburner::Job but job classes are usually just plain ruby objects that respond to perform.
I think a fix would be to pass the job into the on_failure hooks.
Good call out, thanks for surfacing this. I agree with your proposed fix as well as an easy way to go. Or simply removing any documentation related to those hooks and removing that method altogether.