App Engine - 使用 Mapper API 进行任务队列重试计数
这就是我想做的: 我使用新的 Mapper API 设置了 MapReduce 作业。这基本上工作得很好。 问题是任务队列重试所有失败的任务。但其实我不想让他这么做。 有没有办法从队列中删除任务或告诉它任务已成功完成?也许传递 200 状态代码?
我知道我可以获取 X-Appengine-Taskretrycount,但这并没有真正帮助,因为我不知道如何停止任务。我尝试在 try .. except 块中使用“pass”,但这也不起作用。
任何帮助将不胜感激:)
谢谢, 克里斯
here is what I'm trying to do:
I set up a MapReduce job with the new Mapper API. This basically works fine.
The problem is that the Task Queue retries all tasks that have failed. But actually I don't want him to do that.
Is there a way to delete a task from the queue or tell it that the task was completed successfully? Perhaps passing a 200 status code?
I know that I can fetch the X-Appengine-Taskretrycount, but that doesn't really help since I don't know how to stop the task. I tried using a 'pass' in the try .. except block but that didn't work either.
Any help would be much appreciated :)
Thanks,
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
自 http://code.google.com/p/appengine 起-mapreduce/source/detail?r=114 更改,上下文对象具有task_retry_count属性。
As of http://code.google.com/p/appengine-mapreduce/source/detail?r=114 change, context object has task_retry_count attribute.
在您的任务处理程序中执行此操作
希望这有帮助!
In your task handler do this
Hope this helps!!