如何正确启动cherrypy?它在 3.0 中对我有用,但现在我可以提供内容,但每次触摸源时都必须启动我的服务,即使自动重新加载器正在运行。
我已经添加了该cherrypy.engine.block()
语句,该语句有效,但cherrypy随后停止为我的应用程序提供服务(浏览器中没有答案,即使它正确打开了TCP端口)。
那么关于在哪里或寻找什么的任何线索或见解?
这是在标准输出上:
[30/Dec/2012:17:05:28] ENGINE Bus STARTING<br>
[30/Dec/2012:17:05:28] ENGINE Started monitor thread 'Autoreloader'.<br>
[30/Dec/2012:17:05:28] ENGINE Started monitor thread '_TimeoutMonitor'.<br>
[30/Dec/2012:17:05:28] ENGINE Serving on 0.0.0.0:8080<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTED<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTING<br>
[30/Dec/2012:17:05:28] ENGINE Monitor thread 'Autoreloader' already started.<br>
[30/Dec/2012:17:05:28] ENGINE Monitor thread '_TimeoutMonitor' already started.<br>
[30/Dec/2012:17:05:28] ENGINE Already serving on 0.0.0.0:8080<br>
[30/Dec/2012:17:05:28] ENGINE Bus STARTED<br>
我如何开始它:
cherrypy.tree.mount(login(), '/', configPath)<br>
cherrypy.tree.mount(reservation(), '/reservation', configPath)<br>
cherrypy.tree.mount(administration(), '/reservation/administration', configPath)<br>
cherrypy.server.socket_host= "0.0.0.0"<br>
cherrypy.engine.start()