Setup
我按照以下步骤后遇到了404问题不被接受问题的答案App Engine 数据存储区 - 以编程方式备份 https://stackoverflow.com/questions/15811982/appengine-datastore-backup-programatically
我已按照答案提供者之一的建议启用了数据存储管理。我可以在 Google App Engine 控制台中手动触发数据存储备份,并且备份运行不会出现任何故障。
这个问题中的代码位于一个名为“app”的模块中。不是“默认”。
404问题
这是 cron.yaml 中的 cron 作业。
cron:
- description: Regular backup
url: /_backup/fullbackup
schedule: every 24 hours
url 的处理程序会将备份任务放入队列中,队列依次调用
_ah/datastore_admin/backup.create?
gs_bucket_name=%2Fgs%2Ftest.appspot.com%2F21-06-2015&kind=Test&kind=TestContent
&kind=TestDocument&filesystem=gs
(我在这里用“测试”替换了我的应用程序 ID)
这显示了一个404日志中的错误。
如果我在浏览器中使用上面的 url 和我的应用程序主机名(即https://test.appspot.com/_ah/datastore_admin/backup.create?
gs_bucket_name=%2Fgs%2Ftest.appspot.com%2F21-06-2015&kind=Test&kind=TestContent
&kind=TestDocument&filesystem=gs
),我也得到了 404。
这是路由处理程序中的相关代码/_backup/fullbackup
task = taskqueue.add(
url='/_ah/datastore_admin/backup.create',
method='GET',
target='ah-builtin-python-bundle',
params={
'filesystem': 'gs',
'gs_bucket_name': self.get_bucket_name(),
'kind': (
'Test',
'TestContent',
'TestDocument'
)
}
)
问题:
- 问题的原因是什么?
- 我需要在队列名称
taskqueue.add
python代码的一部分?
- 在我的 cron.yaml 中,我需要将目标设置为
ah-builtin-python-bundle
?
EDIT
内置的 datastore-admin 已启用,如该屏幕截图所示。
并且没有dispatch.yaml