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

Feature Request: Graceful shutdown with worker draining #18

Open
lpil opened this issue Aug 3, 2018 · 5 comments
Open

Feature Request: Graceful shutdown with worker draining #18

lpil opened this issue Aug 3, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@lpil
Copy link
Collaborator

lpil commented Aug 3, 2018

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 :)

@lpil lpil changed the title Graceful shutdown with worker draining Feature request: Graceful shutdown with worker draining Aug 3, 2018
@lpil lpil changed the title Feature request: Graceful shutdown with worker draining Feature Request: Graceful shutdown with worker draining Aug 3, 2018
@samsondav samsondav added the enhancement New feature or request label Aug 18, 2018
@samsondav
Copy link
Owner

@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 :)

@lpil
Copy link
Collaborator Author

lpil commented Aug 18, 2018

If I start using Rihanna I'll probably implement it. We'll see what happens in the coming months :)

@lpil
Copy link
Collaborator Author

lpil commented Dec 10, 2018

Looks like I've finally got a Rihanna shaped problem so I'll do this one after #38

@samsondav
Copy link
Owner

@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?

@lpil
Copy link
Collaborator Author

lpil commented Apr 3, 2019

Gleam distracted me I'm afraid.

This is how I implemented this feature within another library -> https://github.com/akira/exq/pull/271/files

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

No branches or pull requests

2 participants