How to catch task failure ?

240 views
Skip to first unread message

Vladyslav Lubenskyi

unread,
Jun 29, 2015, 7:51:57 AM6/29/15
to google-a...@googlegroups.com
Hi,

I configured my push queue to retry failed task 4 times. But how to catch the moment, when all tries failed? Guys, is there a possibility in taskqueue API to handle such case?

I want to send sorry-letter to customers If all tries failed. It would be awesome to have such functionality.

Sincerely,
Vladyslav Lubenskyi

Alejandro Gonzalez

unread,
Jun 29, 2015, 7:57:33 AM6/29/15
to google-a...@googlegroups.com
Hello Vlad,

Have you noticed the request header that carries info about the retry count? 

in Java, inside a task: 

String retryCount = request.getHeader("X-AppEngine-TaskRetryCount");

You can control the number of retries manually, or make something when it has been retried for X times.

Hope this help.



--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/89a05cb2-d30f-4f08-8684-88cd3be8a2ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vladyslav Lubenskyi

unread,
Jun 29, 2015, 8:07:46 AM6/29/15
to google-a...@googlegroups.com
Hi Alejandro,

Thanks for an advice! That means I need to implement it on my own :))
Reply all
Reply to author
Forward
0 new messages