When using "tree.mount(); engine.start(); engine.block()" to start cherrypy
server, we need to manually subscribe to the signal handlers plugin.
For reference:
https://cherrypy.readthedocs.org/en/3.2.6/refman/process/plugins/signalha...
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
src/kimchi/server.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/kimchi/server.py b/src/kimchi/server.py
index ec78b6c..eb58465 100644
--- a/src/kimchi/server.py
+++ b/src/kimchi/server.py
@@ -172,6 +172,10 @@ class Server(object):
cherrypy.tree.mount(plugin_app, script_name, plugin_config)
def start(self):
+ # Subscribe to SignalHandler plugin
+ if hasattr(cherrypy.engine, 'signal_handler'):
+ cherrypy.engine.signal_handler.subscribe()
+
cherrypy.engine.start()
cherrypy.engine.block()
--
1.9.3