-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
execute code with workhorse PID after the workhorse exits #2031
Comments
Hey, sorry for the late reply. You're right, I don't see an obvious place to do this. There are a few places where I think we'd need to modify the code base a little bit to store worker and horse information in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i am using rq together with prometheus client for metrics exposition. i have the prometheus client in multiprocess mode and i need to call a function (
multiprocess.mark_process_dead(pid)
) to let it know when a fork has completed so it can perform some necessary cleanup related to the given PID.my first thought was a custom worker class, but i'm having trouble finding a convenient place to hook into the worker cleanup process that has access to the child's PID.
this is where i'm at now:
but i think that's too late in the process as
self.horse_pid
is already set back to 0 by that point.i appreciate any advice you can offer, and thanks for the awesome project!
The text was updated successfully, but these errors were encountered: