overmind icon indicating copy to clipboard operation
overmind copied to clipboard

Stop specific processes before terminating the rest of the processes

Open lunaisnotaboy opened this issue 2 years ago • 4 comments

So this may be a weird request, but I have a dilemma. I have an application that requires patched versions of Redis and Memcached, so at checkout the setup script builds both of them from source. Because of this, both Redis and Memcached are started with the rest of the process in the development Procfile.

Would it be possible when Overmind receives a Ctrl+C to stop a program (in this case Rails and Sidekiq) before stopping Redis and Memcached so that the programs can store their data properly before shutdown?

Sorry for such a weird request.

lunaisnotaboy avatar Aug 10 '22 15:08 lunaisnotaboy

Oh, I probably should've included my Procfile in the initial request, sorry!

web: bin/rails s -p 3000
webpacker: bin/webpacker-dev-server
sidekiq: bin/sidekiq
meilisearch: bin/meilisearch --master-key="apikey"
memcached: bin/memcached -vv
redis: bin/redis-server

lunaisnotaboy avatar Aug 10 '22 15:08 lunaisnotaboy

Hey @lunaisnotaboy! This feature requires rewriting too much stuff for such a niche feature. So I'd not add it right away but I'll keep this feature request open just in case I or somebody comes up with a good solution.

DarthSim avatar Aug 26 '22 12:08 DarthSim

Ah, okay. Thanks!

lunaisnotaboy avatar Aug 26 '22 15:08 lunaisnotaboy

Just making a note that I'm running into this exact situation as well of needing a few processes that are reliant on by others to be gracefully stopped before the other processes. Not sure of a real solution at the point, I'll noodle on it a bit, but could definitely see the value in having some way to say "don't send the kill signal to process X until after process Y has fully shut down."

tenpaiyomi avatar Nov 25 '22 10:11 tenpaiyomi