-
Notifications
You must be signed in to change notification settings - Fork 39
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
Flexible services shutdown options #22
Comments
I'm currently using an advice to auto-close services buffer
|
I think a global variable (for example For example: (prodigy-define-service
:name "foo"
:kill-process-buffer-on-stop t
) I've been thinking of hooks as well, but that's not just related to stop. That would make sense for start and restart also for example. (prodigy-define-service
:name "foo"
:after-stop (lambda ()
(kill-buffer ...)
)) Another configuration that might be useful is What do you think? |
That sounds perfectly reasonable to me, especially in the early stages of the project. Issue #3 is kind of related. When providing services definitions, users should be able to provide a way to ensure that the desired action has completed with the expected side-effect, if needed (Tomcat started but not ready yet, WebRick stop initiated but not completed, etc.). If the signal sent to terminate a program is a SIGKILL, there's no need for extra logic. In most cases, I think that a SIGTERM will be used to allow programs to shutdown gracefully without creating any kind of state/db corruption. |
I think that it would be useful to have the following features:
auto-close-service-buffer-on-stop
to close theprodigy-service-name
buffer if theservice-name
is stopped.stop-service-hook
in the same spirit of init-async? If bound, then call the hook after sending the signal?Below is an example of what I use with Tomcat. When I stop the service, ideally I want to close the "prodigy-tomcat" buffer automatically. Thus a
auto-close-service-buffer-on-stop
parameter that defaults tot
would be convenient.Thanks
The text was updated successfully, but these errors were encountered: