objectify / objectify

The simplest convenient interface to the Google Cloud Datastore
MIT License
728 stars 162 forks source link

Get Deferred Operation Count #245

Open stickfigure opened 9 years ago

stickfigure commented 9 years ago

Original issue 231 created by objectify on 2015-03-25T12:32:37.000Z:

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.

stickfigure commented 9 years ago

Comment #1 originally posted by objectify on 2015-03-25T18:45:00.000Z:

<empty>