Greg, Please star this issue. http://code.google.com/p/googleappengine/issues/detail?id=1116
One person noted in the comments that you could cache a system wide value when the first put request fails so that you don't have to do a test put() on every request to your application. It would be interesting if run_in_transaction throws this exception even with dummy functions but I would guess that it doesn't throw the error unless it actually tries to a write. Ian On Mon, Jun 8, 2009 at 2:58 PM, Greg <[email protected]> wrote: > > With the upcoming maintenance, I want to add a check at the start of > the handler to see if I should display a maintenance notice. This will > run on every request, so it would be good to use as lightweight a > check as possible. The documentation says CapabilityDisabledError is > thrown by db.Model.put(), db.Model.delete(), and > db.run_in_transaction(). > > My question is this: can I use run_in_transaction() with a dummy > function - testing without the overhead of actually doing a put()? > > I realise that in this case memcache is also being disabled, so I can > test by doing a memcache.set() instead, but it would be nice to > develop a function that can be called to test both, for cases when > maintenance only affects one or the other. Also could a Googler > comment on how syncronised the disabling of datastore and memcache > are? Milliseconds, seconds, or minutes? > > > > -- ======================================= 株式会社ビープラウド イアン・ルイス 〒150-0012 東京都渋谷区広尾1-11-2アイオス広尾ビル604 email: [email protected] TEL:03-5795-2707 FAX:03-5795-2708 http://www.beproud.jp/ ======================================= --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
