-
Checkin to TGγͺγ―γγγΉγ¨γγΈγΌζ ͺεΌδΌη€Ύ
by in Chuo, Tokyo, JapanBig Constantine πβ€οΈ -
Checkin to Tully's Coffee
by in Tokyo, Tokyo, JapanEnjoying a nice cup before work. βοΈ -
Response to
byFor the last week or two, I have been thinking whether there is a December blogging series I could take on, similar to how Advent of Code publishes a new coding challenge every day throughout Advent.
β¦
From now up until December 24th, I hope to write a blog post every day about a blog that I find interesting.Fantastic idea. Looking forward to the Advent James! -
byPlugins can now be enabled and disabled in production (when running in gunicorn/uWSGI) without bringing the server down π.
The issue was that only a single process (the one that handled the request) got the plugin dynamically enabled. When the other processes tried to lookup urls/templates from the plugin, it didn't exist as it's not enabled and returned an error. -
How to Gracefully Restart A Parent Process
byWhen 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.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.