views:

49

answers:

1

I'm working on a GAE app that will take a comma separated list and create a batch job out of it. I want to add one task to the task queue from any one batch job at a given time. The problem with this is that if a task can't be executed it will just keep repeating for ever and the rest of the tasks will never get added to the queue. Is there any way from within my code I can kill a task in the task queue if it's execute too many times?

+1  A: 

There's a http header for tasks called "X-AppEngine-TaskRetryCount" that tells you the retry count. If its over a certain threshold then simply exit the task.

dunelmtech
How do you exit a task?
blcArmadillo