如何在Google App Engine上调试Cron Jobs? [英] How to debug Cron Jobs on Google App Engine?
问题描述
Cron(与Rails应用程序一起)已通过 cron.yaml
部署到GCP:
Cron is (alongside the Rails app), deployed to GCP with cron.yaml
:
cron:
- description: count things regularly
url: /api/v1/cron/rake_task
schedule: every 30 minutes
timezone: Europe/Berlin
问题
Problem
如何查看cron日志? View 完全不显示任何内容,但显然必须有一种明智的方法来调试故障。
How to see the cron log? View reveals nothing at all, but clearly there has to be a sensible way to debug the failure.
在标准环境中,可以使用 / var / log / syslog
或 / var / log / cron.log
,但是如果我登录到VM甚至使用主 gaeapp
容器,这里都没有任何作用。
On a standard environment one could go after /var/log/syslog
or /var/log/cron.log
, but here there's nothing if I log in to VM or even go after the main gaeapp
container.
欢迎任何线索!
推荐答案
Cron日志已填充到日志中默认服务。
Cron log gets populated into the log of default service.
应该为cron调用的Rake任务路由而不是默认服务的 View 链接日志。
Instead of View link log of default service should be filtered for the Rake task route that the cron is calling.
这篇关于如何在Google App Engine上调试Cron Jobs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!