views:

33

answers:

1

I am running thousands of tasks per hour in Google App Engine and around .1% of them are failing even after multiple retries. Ideally, I want them to stop trying and exit. However, due to app engine's design they seem to be just trying again and again. I know there is a backoff time which increases with every unsuccessful execution, but I want them to exit after n retries altogether.

Can i accomplish this somehow? can a task get a count of the number of times it has unsuccessfully run?

+2  A: 

Yes, you can get a count of the number of times your task has been retried by reading the X-AppEngine-TaskRetryCount HTTP header.

David Underhill
Thanks! this is exactly what i needed
demos