The safest bet for time and other things is to have another attribute as datCreateDate = db.DateTimeProperty(auto_now_add = True) datModDate = db.DateTimeProperty(auto_now = True)
While datCrateDate stores the creation date, datModDate stores the last modified date. Regards, Pranav P. On Apr 26, 9:14 pm, Jens Scheffler <[email protected]> wrote: > > Does anybody know whether UNIX tme is the same on all google servers? > > I would not rely on that. What you could do is something similar as > described > here:http://blog.appenginefan.com/2009/04/efficient-global-counters-revisi... > > - add a second property (integer value) to your sharded model. The > entity with the highest shard number is the last entity updated. > - use memcache to remember the last id. Use the increment operation in > memcache to increase the id whenever a new property is stored. > - if the property gets evicted from memcache, find the right value > from the datrastore and add it _conditionally_ back to memcache (to > prevent race conditions) > > On Apr 26, 8:02 am, Ivan Maslov <[email protected]> wrote: > > > I already have it in entity. But this entity is updated more than 5 > > times/second sometimes. THerefore I want to create sharders for it. See > > article about it: > > code.google.com/intl/ru/appengine/articles/sharding_counters.html . But I > > have a string property (not number) in entity. How can I know what sharder > > was last updated? > > I think to append UNIX time to property, e.g.: 'value1_1234567890', > > 'value2_1234567894', etc. Does anybody know whether UNIX tme is the same on > > all google servers? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
