开发者

Is there a way to programmatically stop web.py?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜