gpt4 book ai didi

django - 重启 Django 生产服务器(passenger wsgi)

转载 作者:行者123 更新时间:2023-12-04 20:01:20 24 4
gpt4 key购买 nike

我将修改后的 views.py 上传到生产服务器,但它仍在使用旧代码。我还删除了 views.pyc 和 views.py 以查看它是否清除了旧的缓存 python 代码。这在过去几次等待一段时间后才奏效,但我真的很想知道如何快速做事。该站点托管在 dreamhost 上并使用 passenger wsgi。

如何快速手动重启它,以便它使用我的新 views.py 代码?

最佳答案

http://wiki.dreamhost.com/Django#Hints

If you modified your application and your changes do not seem to be reflected, you may need to notify Passenger about your change by creating or modifying ~/example.com/tmp/restart.txt:

touch /home/user/example.com/tmp/restart.txt

Passenger looks for this file and reloads the application when this file is modified.

关于django - 重启 Django 生产服务器(passenger wsgi),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5440846/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com