App Engine本地开发服务器每次对文件进行更改时都会重新加载 - 这很酷。什么是不酷的是它还会重新加载PyCharm编辑器的.idea文件夹中的更改,使日志变得混乱。试图将此添加到app.yaml
:
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^\.idea$ # added this line in order to try and ignore .idea folder on build
这没有任何帮助。每次我在编辑器中执行任意操作时都会重建(不更改任何代码)。
如何告知App Engine dev服务器忽略哪些文件夹进行热重新加载?
答案 0 :(得分:0)
dev_appserver.py --help
提及:
--watcher_ignore_re WATCHER_IGNORE_RE
Regex string to specify files to be ignored by the
filewatcher. (default: None)
在这种情况下,这与dev_appserver.py
相关,它将检测本地app.yaml
中的更改并重新加载本地服务器,而在GAE中运行的app.yaml
不应该执行,因为重新加载已完成gcloud app deploy
。