我刚刚在 GAE 上实现了模块,并尝试从某个模块运行 Cron 作业。我的 app.yaml 顶部有以下值:
application: myapp
module: default
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
#all handlers
我尝试激活的模块的 reporting.yaml 具有以下设置:
application: myapp
module: reporting
version: 1
instance_class: B4
runtime: python27
api_version: 1
threadsafe: true
handlers:
#same handlers as app.yaml
最后我的 cron.yaml 如下所示:
cron:
- description: update reports
url: /update
schedule: every day 12:00
target: reporting
我需要该模块,因为该作业需要比普通实例提供的内存更多的内存。然而,由于某种原因,当我查看应用程序的日志时,它会继续在默认模块上执行 cron 作业。为什么它不接受目标参数?
最佳答案
结果我错过了使用以下命令上传模块本身:
appcfg update app.yaml reporting.yaml
执行此操作后,目标参数起作用了。
关于python - GAE Python - Cron 作业未在目标模块上执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21185257/