[英]How to reload the modified files without restarting in pylons?
I'm using pylons, and using this command to start the server: 我正在使用挂架,并使用以下命令来启动服务器:
paster serve --reload development.ini
I found when I modify something, the paster will reload the application. 我发现修改内容时,粘贴程序将重新加载应用程序。 In the console, it shows: 在控制台中,它显示:
-------------------- Restarting --------------------
Starting server in PID 7476.
serving on http://127.0.0.1:5000
This is convenient but not enough, because it will cost 5 seconds more or less each time. 这很方便,但还不够,因为每次或多或少要花费5秒。 If I refresh that page and the server is not reloaded completely yet, the page will display the old content, and I don't know if it is the lastest content, so I had to refresh the page several times to make sure. 如果刷新该页面并且服务器尚未完全重新加载,则该页面将显示旧内容,并且我不知道该内容是否为最新内容,因此我必须刷新页面几次以确保。
I wonder if there is a better way to read the modified content without reloading, or find a quicker reloading? 我想知道是否有更好的方法来读取修改后的内容而无需重新加载,或者找到更快的重新加载方式?
To controllers, you can configure Routes to rescan the directory controllers without restart application: 对于控制器,您可以配置路由以重新扫描目录控制器,而无需重新启动应用程序:
http://pylonshq.com/docs/en/1.0/controllers/#adding-controllers-dynamically http://pylonshq.com/docs/en/1.0/controllers/#adding-controllers-dynamically
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.