Hi Mark, Thank you so much for spending some of your scarse time on this for us.
On Wed, 16 Oct 2024 at 22:58, Mark Sapiro <[email protected]> wrote: > On 10/16/24 07:02, Marco van Tol wrote: > > On Wed, 16 Oct 2024 at 14:45, Marco van Tol <[email protected] > > <mailto:[email protected]>> wrote: > > > > The script went on its way for a bit, and then blew up. > > (attachment: error-run-1.txt) > > I suspect the issue there is in the order of deletion and a message > which is a parent in a thread gets deleted before the child. > That's very much what it looks like, yeah. Perhaps I could somehow sort the returned array of messages on the date and then delete them from recent-to-old. > > I made a change to the script that's really blunt but does work. > > > > See the attached change. I can make it more efficient by calling the > > Email.objects.filter() once per loop instead of the current 2, but if > > you have any other improvements they'd be welcome. > > I don't have any suggestions. > That's okay, thanks for thinking about it. > > And secondary: can I avoid the call to rebuild_index? The actual > > production server has a massive count of messages. > > If the massive count is distributed over multiple lists with not so many > messages you can run the Django update_index_one_list job to just do one > list. This is very helpful, thank you so much! Marco van Tol RIPE NCC _______________________________________________ Mailman-Developers mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3 Security Policy: https://wiki.list.org/x/QIA9
