I have the basics, which are posted below. However, this is where I'm realizing I'm still very new at learning python. What I'd like to do it only catch the timeout error for the retries, and at the end of the retries go ahead and return the timeout error, as if it's failed 3 times, I'm going to assume it will keep failing and it's up to the application to handle that.
class ROTModel(db.Model): """ Retry On Timeout Model. This model exists to override the put method of db.Model in order to retry the put operation when a timeout error is encountered. """ def put(self): count = 0 while count < 3: try: return db.Model.put(self) except: count += 1 else: raise datastore._ToDatastoreError() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---