qickrooms / objectify-appengine

Automatically exported from code.google.com/p/objectify-appengine
MIT License
0 stars 0 forks source link

Get Deferred Operation Count #231

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be handy to get a count of the number of deferred operations. 
Sometimes I use defer() just to batch things up for performance. Think of a 
task that loops through all the entities of a given kind updating them. If 
there are many, it would make sense to flush them periodically:

for each entity
  ofy().defer().update()
  if there are > 1000 updates waiting
    ofy().flush()

Certainly I can keep track myself, so no big deal, but I think it would be nice 
to have supported within Objectify since the data is already there.

Original issue reported on code.google.com by ersim...@gmail.com on 25 Mar 2015 at 12:32

GoogleCodeExporter commented 9 years ago

Original comment by lhori...@gmail.com on 25 Mar 2015 at 6:45