Open lpil opened 6 years ago
@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 https://github.com/samphilipd/rihanna/issues/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 :)