How to Gracefully Restart A Parent Process
by
When enabling or disabling plugins in Tanzawa, for urls to register correctly across all sub-processes, you must restart all processes, not just fiddle with the process that made the request.
The complete changes are in PR #121, but the line of interest is below.
The complete changes are in PR #121, but the line of interest is below.
import os import signal os.kill(os.getppid(), signal.SIGHUP)
Where getppid gets the process id of the parent process (gunicorn, uwsgi, etc...) and sends it a HUP signal.
Interactions
1
1
-
like