Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook documentation is misleading about the ability to bury a job #172

Open
contentfree opened this issue Sep 30, 2021 · 1 comment
Open

Comments

@contentfree
Copy link
Collaborator

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.

@nesquena
Copy link
Owner

nesquena commented Oct 1, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants