Seems basically the same. Just out of curiosity, how many do you delete when you experience hi-CPU?
2010/5/17 Jaroslav Záruba <[email protected]> > This is how I do it: > > List<BlobInfo> blobsToDelete = new LinkedList<BlobInfo>(); > Iterator<BlobInfo> iterator = new BlobInfoFactory().queryBlobInfos(); > while(iterator.hasNext()) > blobsToDelete.add(iterator.next()); > > BlobstoreService blobstoreService = > BlobstoreServiceFactory.getBlobstoreService(); > for(BlobInfo blobInfo : blobsToDelete) > blobstoreService.delete(blobInfo.getBlobKey()); > > On Mon, May 17, 2010 at 11:22 AM, Geoff <[email protected]> wrote: > >> Hi, >> >> What is the easiest way of deleting all my 'blobstore' data? >> >> I have quite a lot of blobs and I'd like to delete them all. I'm >> currently doing the following: >> >> class deleteBlobs(webapp.RequestHandler): >> def get(self): >> all = blobstore.BlobInfo.all(); >> more = (all.count()>0) >> blobstore.delete(all); >> >> if more: >> taskqueue.add(url='/deleteBlobs',method='GET'); >> >> which seems to be using tons of CPU and (as far as I can tell) doing >> nothing useful. >> >> Geoff. >> >> -- >> 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]<google-appengine%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> >> > -- 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.
