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

Let httpok send more signals [feature request] #47

Closed
jean opened this issue Sep 1, 2014 · 1 comment
Closed

Let httpok send more signals [feature request] #47

jean opened this issue Sep 1, 2014 · 1 comment
Labels

Comments

@jean
Copy link
Contributor

jean commented Sep 1, 2014

I would like httpok to send SIGUSR1 before killing a Zope instance, to obtain a thread dump, so that I can figure out what was keeping the instance busy.

What would be a good way to specify this in configuration?
Would something like the following make sense?

diff --git a/superlance/httpok.py b/superlance/httpok.py
index 23682fc..3e7c6b1 100644
--- a/superlance/httpok.py
+++ b/superlance/httpok.py
@@ -280,6 +280,8 @@ class HTTPOk:
                         namespec, m.read()))
             write('%s is in RUNNING state, restarting' % namespec)
             try:
+                for signal in self.signals:
+                    self.rpc.supervisor.signalProcess(namespec, signal)
                 self.rpc.supervisor.stopProcess(namespec)
             except xmlrpclib.Fault as e:
                 write('Failed to stop process %s: %s' % (

Raised at https://lists.supervisord.org/pipermail/supervisor-users/2014-September/001520.html too.

(signalProcess is not yet in a supervisor release.)

@mnaberez mnaberez added the httpok label Sep 4, 2016
@mnaberez
Copy link
Member

mnaberez commented Sep 4, 2016

Support for sending arbitrary signals was released in Supervisor 3.2.0. I'm not sure what the best way to make this particular feature would be, perhaps it could be something like "--presignal <signame> sends a signal before sending the stop command" but that's just one idea. Feel free to submit a patch.

@mnaberez mnaberez closed this as completed Sep 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants