-
Notifications
You must be signed in to change notification settings - Fork 47
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
Feature Request: Graceful shutdown with worker draining #18
Comments
@lpil Thanks for this feature request! I can't imagine it would be that hard to do, it would be a great place if you wanted to start getting involved in Rihanna development :) |
If I start using Rihanna I'll probably implement it. We'll see what happens in the coming months :) |
Looks like I've finally got a Rihanna shaped problem so I'll do this one after #38 |
@lpil did you ever get anywhere with this? I think it would be a rather nice feature. I looked into it before but I actually couldn't figure out how to find out if the BEAM is about to terminate inside the GenServer. Do you have any ideas about that? |
Gleam distracted me I'm afraid. This is how I implemented this feature within another library -> https://github.com/akira/exq/pull/271/files |
It would be great if when the application is shutting down a period of time is given for the workers to finish.
If the workers finish within the grace time the application continues shutting down, if they do not they are killed and then shut down continues.
Here's an example of how I implemented this in Exq: https://github.com/akira/exq/pull/271/files
I may be up for implementing this at a later date :)
The text was updated successfully, but these errors were encountered: