Time Limit for Task Queue in Google App Engine

I am using Task Queue in GAE to do some background work for my application. I found out that there is a 10 minute time limit for a specific task. My problem is how can I test this in my local environment. I tried the hibernation thread, but it did not throw any exceptions, as mentioned in the Google engine docs. Also, this time interval is measured by the processor time or the actual time.

Thank.

+3
source share
2 answers

Time is measured in wall clock mode. The development server does not apply a time limit, although it is not clear why you want to test it, because it is unlikely that your tests will work the same way as in production, so try to guess how much you can complete in 10 minutes on production servers by seeing how much you can complete in 10 minutes on the development server will fail.

+2
source

For your development server, start the timer when the task starts. keep checking your code if you have reached 10 minutes of wall clock. When you reach, draw a DeadlineExceededError. It would be better to have try and except statements in class handlers that call a specific function of your code.

+1
source

All Articles