I want to purge old entities from the datastore. How I do this at the moment is having a cron job run a script every 30 seconds. The script removes entries using deletePersistentAll() via a JDO query object.
Query query = pm.newQuery(Game.class, "lastUpdateTime < ageLimit"); query.declareParameters("long ageLimit"); long numRemovedGames = query.deletePersistentAll(ageLimit); The datastore contains about 2000 or so objects that should be removed. However, when I run this the request is killed with a DeadlineExceededException and no objects are removed. The same issue will happen again, again and again every time the cron job runs since no objects are removed. If I try to use setRange() to limit the number of objects being removed, it will throw another exception saying I'm not allowed to do that. Is the only solution to actually get the objects, and then remove them one by one? -- 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.