Paste (Python) Web Server - Autoreload Problem

前端 未结 2 1162
礼貌的吻别
礼貌的吻别 2021-01-14 05:20

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

相关标签:
2条回答
  • 2021-01-14 06:04

    I had a similar problem and circumvented the problem. I currently have paster running on a remote host, but I am still developing, so I needed a means to restart paster, but manually by hand was too time consuming, and daemon didnt work. So I always had to keep a shell window open to the server and running paster without --daemon in there. Once I finished my work for that day, and i closed the shell, paster died, which is bad.

    I circumvented that by running paster non daemonized in a "screen". Simply type "screen" in your shell of choice, you will usually depending on your linux be presented with a virtual terminal, that will keep running even when you log out your remote session. Start paster as usually in your new "window" (the screen) with --reload but without daemon, and then detach the window, so you can return to your normal shell (detach = CTRL-A, then press D). You can re-enter that screen by typing "screen -r". If you would like to kill it, reconnect it (screen -r) and inside the screen type CTRL-A, then press K.

    Hope that helps.

    0 讨论(0)
  • 2021-01-14 06:06

    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.

    0 讨论(0)
提交回复
热议问题