I use Google AppEngines Task Queues.
我使用Google AppEngines任务队列。
How can I figure out, if the task thats called is called for the last time (after n fails/retries)?
如果最后一次调用被调用的任务(在n次失败/重试之后),我该如何判断?
https://developers.google.com/appengine/docs/python/taskqueue/overview-push
1 个解决方案
#1
0
Looking at the documentation that you linked to, it looks like you can get the number of retries for the current task by looking at the X-AppEngine-TaskRetryCount
HTTP header.
查看链接到的文档,看起来您可以通过查看X-AppEngine-TaskRetryCount HTTP标头来获取当前任务的重试次数。
If you know the task_retry_limit
, you'll know if it's being called for the last time.
如果您知道task_retry_limit,您将知道它是否最后一次被调用。
#1
0
Looking at the documentation that you linked to, it looks like you can get the number of retries for the current task by looking at the X-AppEngine-TaskRetryCount
HTTP header.
查看链接到的文档,看起来您可以通过查看X-AppEngine-TaskRetryCount HTTP标头来获取当前任务的重试次数。
If you know the task_retry_limit
, you'll know if it's being called for the last time.
如果您知道task_retry_limit,您将知道它是否最后一次被调用。