[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-21 Thread [EMAIL PROTECTED]
I was worried about left over expired session data and cache items when I wrote appengine utilities. What I did was write into both systems a clean up routine. I set it to run 15% of the time an instance is initialized (since is session and cache, generally happens once a request) and would go in

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-21 Thread Wooble
On Oct 21, 7:50 am, "I.K." <[EMAIL PROTECTED]> wrote: > I have a similar data maintenance problem and I'm planning a 'cron- > like' work-around which I'm happy to share. A basic option is to use > an Ajax library which has a timer function, to call a method on your > system which deletes unwante

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-21 Thread I.K.
Hi, I have a similar data maintenance problem and I'm planning a 'cron- like' work-around which I'm happy to share. A basic option is to use an Ajax library which has a timer function, to call a method on your system which deletes unwanted data in batches. Unfortunately you then need a web page

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-21 Thread [EMAIL PROTECTED]
The "cron job" functionality would have to be invoked manually at present but I see what you mean. I couldn't set all the posts as hidden obviously but I could set the thread's status to hidden and for each attempted view of the posts it would have to check the thread was not hidden. I think the

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread Ross Ridge
Andrew Badera wrote: > Why do you need to delete all posts? Couldn't you just kill the parent > itself, and leave the other entities orphaned in limbo, never to be > retrieved again? I'd just mark the thread as "hidden", so it wouldn't show up for ordinary users, but it would still be visable by

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread [EMAIL PROTECTED]
That's an interesting idea but that would leave them accessible still (at least unless I did various checks) and also uses space still. Of course I could always do regular queries to search and remove such posts but they would need to be scheduled and I don't believe that is currently possible. S

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread Andrew Badera
Why do you need to delete all posts? Couldn't you just kill the parent itself, and leave the other entities orphaned in limbo, never to be retrieved again? On Mon, Oct 20, 2008 at 4:13 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Thanks everyone. I must say this is a little unsatisfa

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread [EMAIL PROTECTED]
Thanks everyone. I must say this is a little unsatisfactory only deleting 1000 entries. My forum at http://silicon.appspot.com/ is growing quite large and although I have no threads containing 1000 posts yet there are a few in the 100s. Obviously moderators and administrators can delete threads

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread Ross Ridge
theo wrote: > Ok, but that doesn't answer the fundamental quastion. Well, I read the fundamental question as "In the general case, is there a way to easily delete all of the entities of a given model?", and the answer to that question is no. The amount entities you can delete in single call to

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread [EMAIL PROTECTED]
for post in Post.gql('') will return 1000 max. On Oct 20, 11:33 am, theo <[EMAIL PROTECTED]> wrote: > Ok, but that doesn't answer the fundamental quastion. > > Does this work: > > posts = [] > for post in Post.gql('') >   posts.append(post) > > db.delete(posts) > > On Oct 20, 6:33 am, Ross Ridge

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread theo
Ok, but that doesn't answer the fundamental quastion. Does this work: posts = [] for post in Post.gql('') posts.append(post) db.delete(posts) On Oct 20, 6:33 am, Ross Ridge <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I have a very quick question that I was not able to decide by

[google-appengine] Re: Is db.delete Limited To 1000 Items?

2008-10-20 Thread Ross Ridge
[EMAIL PROTECTED] wrote: > I have a very quick question that I was not able to decide by looking > at the docs. As the title suggests, I'm wondering whether > db.delete(Post.all()) would delete every single post even if there > were more than 1000 Posts. The delete function will only delete the