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

Support callback on job death #65

Open
Tylerian opened this issue Jul 4, 2022 · 2 comments
Open

Support callback on job death #65

Tylerian opened this issue Jul 4, 2022 · 2 comments

Comments

@Tylerian
Copy link

Tylerian commented Jul 4, 2022

As of today, there's no way to know when a Job is about to die besides taking a look on Faktory's web UI Morgue view.

Sidekiq offers a sidekiq_retries_exhausted hook to handle this. It would be nice if Faktory offered something similar so we can handle those cases programmatically.

@mperham
Copy link
Contributor

mperham commented Jul 5, 2022

Faktory v1.6.0 added a new “remaining” count to the job failure structure. You should be able to use this within the worker to implement a death callback. If you want to prototype a PR, I’d be happy to see one.

@Tylerian
Copy link
Author

Tylerian commented Sep 7, 2022

If you want to prototype a PR, I’d be happy to see one.

Will do. Thanks for the heads up.

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