-
-
Notifications
You must be signed in to change notification settings - Fork 56
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: per-process shutdown command / trap support #3
Comments
I think that the proposal is clear:
Does it sound reasonable? |
Perfect, good catch with not waiting indefinitely! 10s seems plenty, but not too much. |
@thenonameguy I've implemented the first stage of the solution in release 0.11.0 in which a manual termination request (F9 in the TUI) will use the shutdown procedure. |
@thenonameguy v0.12.0 should resolve the issue fully. |
Thanks @F1bonacc1 for the very fast implementation! Once this is addressed via either idempotency or extra configuration IMO the feature can be considered done. 🎉 |
@thenonameguy you are right! I've been thinking about something along those lines:
On the positive side, a lot of infra that I added can be reused :) |
That sounds perfect! Communicating to the supervisor that it's a daemon/service vs. process makes sense to be able to implement this kind of logic. I guess for 2. in this case you could translate the You are awfully getting close to a minimal systemd service definition language here with this change though. The end-goal might be for this project that you can almost trivially switch from systemd service files/kubernetes-based pod definitions to locally running processes with minimal service definition change / wide-enough feature set to be usable. Looking good so far! 🎉 |
@thenonameguy if you still didn't give up on this project, the changes that we discussed are in v0.15.0:
It took longer than expected... Lot's of edge cases to iron out. Please confirm that it works on your end as expected and I will close the issue. |
I absolutely haven't, have been using the daemon support happily since the release. Really glad about the health checks, will integrate it tommorrow in my project 👏 |
@thenonameguy is the issue resolved from your point of view? |
Yes, it works flawlessly, great job! It's a great resource for our project 🎉 |
Make docs renderable
For my use-case most of the commands I'm managing via
process-compose
eventually yield a process into the background, and exit cleanly with 0, with a no retry policy.Other processes use the
process_completed
dependency feature to realize that the given process (let's say a postgres init script) has concluded and now the postgres server is ready in the background.So far so good 🎉
Now, the only problem with these daemon-launching scripts are that if the
process-compose
process is killed, the underlying daemons are not turned off.This leaves the environment in an inconsistent state (unlike calling
docker-compose down
/ Ctrl-C'ing theup
command).Proposal:
processes.$PROCESSNAME.shutdown_command: string
to the schemaprocess-compose
itself,exec.Command
these commands in parallel, wait for the command to terminate.stretch goal/kinda unrelated but-nice-to-have:
The text was updated successfully, but these errors were encountered: