简体   繁体   English

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

[英]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.

相关问题 如何在不重新启动应用程序的情况下自动重新加载 python 模块? - How to auto reload python module without restarting app? 如何在不重新启动服务器的情况下更改和重新加载女服务员的python代码? - How to change and reload python code in waitress without restarting the server? 如何在Pylons中翻译javascript文件 - How to translate javascript-files in Pylons 在不重启的情况下从数据库重新加载变量数据 Django - Reload Variable Data from DB without restarting Django 在不重新启动主脚本的情况下加载/重新加载Python中的一部分代码 - Load/reload a portion of code in Python without restarting main script 如何在运行时重新定义函数,而无需重新启动程序? - How to redefine a function at runtime, without restarting the program? 如何在不重新启动Python的情况下清空缓冲区 - How to empty buffer without restarting Python 如何在不重新启动笔记本的情况下清除 jupyter 内存 - How to clear jupyter memory without restarting notebook Django - 在不重新启动开发服务器的情况下应用HTML和静态文件中的更改 - Django - Apply changes in HTML & Static files without restarting dev server 如何提取最新修改的文件? - How to extract the latest modified files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM