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

feat: add on_exit hook #503

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ThomasCrambert
Copy link

Expose new on_exit hook to allow post-shutdown cleanup actions.

Notes:

  • I made it for all kind of processes, but I believe it would only be useful for workers as they are the only one that may require such hooks. Do you believe it should only be for workers now and add them for the others later?
  • Dispatchers currently trigger run_stop_hooks in after_shutdown but workers trigger them at before_shutdown, I changed it in this PR but was that the expected behavior?

@ThomasCrambert ThomasCrambert force-pushed the ThomasCrambert/add-before-exit-hook branch from fdd4f44 to c23f56f Compare January 29, 2025 13:23
@ThomasCrambert ThomasCrambert force-pushed the ThomasCrambert/add-before-exit-hook branch from c23f56f to 037ce56 Compare January 29, 2025 13:28
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

Successfully merging this pull request may close these issues.

1 participant