Recently, I have refactored my code such that I no longer need entities of a
particular kind.  I was curious how I would go about writing a task to
delete these entities in bulk.  I have set up a task that performs a query
specifying only the kind, and then using a cursor to delete the entities on
the task queue.  However, when I run the task it seems to complete
prematurely rather than delete all entities.

Here's the process I use:


   - I perform a query for all entities of a particular kind.  For instance
   "SELECT * FROM SomeKind" or new Query("SomeKind") in Java.
   - I delete as many entities as I can using the results of the query until
   I hit a soft deadline.  I set that up myself to be 10 seconds, or so.
   - If there are more results left, I generate a cursor and pick up again
   and re-queue the task to execute again.
   - If there are no results left, I just leave finish the task logging the
   result.

The problem is, the task seems to finish prematurely and it appears to
either delete only a few hundred entities, or it simply skips a few here and
there.  Running it in the debugger, it all seems to work well, but on the
AppEngine it doesn't seem to work quite as well.  Any thoughts or
suggestions?

Thanks,
Patrick.

-- 
Patrick H. Twohig.

Namazu Studios
P.O. Box 34161
San Diego, CA 92163-4161

-- 
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-appeng...@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.

Reply via email to