如何在不重新启动pylons的情况下重新加载修改后的文件?
我正在使用 pylons,并使用此命令来启动服务器:
paster serve --reload development.ini
我发现当我修改某些内容时,粘贴器将重新加载应用程序。在控制台中显示:
-------------------- Restarting --------------------
Starting server in PID 7476.
serving on http://127.0.0.1:5000
这很方便,但还不够,因为每次都会或多或少花费 5 秒。如果我刷新该页面并且服务器尚未完全重新加载,页面将显示旧内容,并且我不知道它是否是最新内容,因此我必须刷新页面几次才能确定。
我想知道是否有更好的方法可以在不重新加载的情况下读取修改的内容,或者找到更快的重新加载?
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. 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于控制器,您可以配置路由以重新扫描目录控制器,而无需重新启动应用程序:
http://pylonshq.com/docs/en/1.0/controllers/#adding-controllers-dynamically
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