粘贴(Python)Web服务器-自动重新加载问题 [英] Paste (Python) Web Server - Autoreload Problem

查看:98
本文介绍了粘贴(Python)Web服务器-自动重新加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我以守护程序模式启动粘贴 Web服务器时,似乎在更新源文件的时间戳时丧失了重新加载的能力。

When I start the `Paste' web server in daemon mode, it seems to kill off it's ability to reload when the timestamp of a source file is updated.

这是我启动守护程序的方式...

Here is how I start the daemon...

cd ${project} && ../bin/paster serve --reload --daemon development.ini; cd ..;

...这违背了使用Paste(对我而言)的要点之一。

...which defeats one of the main points of using Paste (for me).

有人遇到过这个问题,或者知道我在做什么错吗?

Has anyone come across this or know what I'm doing wrong?

为完整起见,我m更改是一个控制器文件。

To be complete, the file that I'm changing is a controller file.

版本为`PasteScript 1.7.3'

The version is `PasteScript 1.7.3'

推荐答案

我相信这两个选项本质上是不兼容的,因为重新加载程序使用SIGTERM停止服务器,并且守护进程化的服务器对此不渗透-并且由于 daemon 用于运行在生产环境中,而 reload 用于开发/调试环境,我认为它们的不兼容性不会被视为很大的损失。我想当然可以开发出一种定制的重新加载程序,专门用于适当地停止和重新启动守护进程的服务器,但是我不知道任何现有的重新加载程序。

I believe that the two options are essentially incompatible, since the reloader stops the server with a SIGTERM and the daemon-ized server is impervious to that -- and since daemon is intended for running in a production environment, and reload for a development/debugging environment, I guess that their incompatibility is not seen as a big loss. I imagine a customized reloader, tailored to properly stop and restart the daemonized server, could certainly be developed, but I don't know of any existing one.

这篇关于粘贴(Python)Web服务器-自动重新加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆