如何在不重新启动pylons的情况下重新加载修改后的文件?

发布于 2024-09-15 09:13:51 字数 432 浏览 5 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

携余温的黄昏 2024-09-22 09:13:51

对于控制器,您可以配置路由以重新扫描目录控制器,而无需重新启动应用程序:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文