I'm trying to run web.application in a Windows Service and I cannot find a way to programmatically stop it after application.r开发者_高级运维un().
I tried sys.exit and it didn't work well with Windows Service.
I solved the question I originally raised by looking into web.py source code, and exposed the WSGIServer in web/httpserver.py to web/application.py, so that i can call WSGIServer.stop() in application.stop(), which is added by myself.
It's a quick hack and not that neat, but it removed the blocker quickly.
精彩评论