I created the following function to shutdown cherrypy
:
import cherrypy
cherrypy.engine.exit()
Name of the file: shutdown.py
. And then I enter the command python shutdown.py
in the command line. The following messages showed up:
[06/Sep/2014:11:28:22] ENGINE Bus STOPPING
[06/Sep/2014:11:28:22] ENGINE HTTP Server None already shut down
[06/Sep/2014:11:28:22] ENGINE No thread running for None.
[06/Sep/2014:11:28:22] ENGINE No thread running for None.
[06/Sep/2014:11:28:22] ENGINE Bus STOPPED
[06/Sep/2014:11:28:22] ENGINE Bus EXITING
[06/Sep/2014:11:28:22] ENGINE Bus EXITED
However, CherryPy is still running. How do I shutdown CherryPy then?
Also, what if I have multiple cherrypy servers running at the same time? Does the shutdown.py
kill all of them?