From 8b2cb37d61dc71c95c6bab860ef6b2da98516cfd Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Wed, 24 Dec 2003 17:09:30 +0000 Subject: finished_update_article(): Richard Barrett's fix to reduce Pipermail archive bloat by deleting the html_body attribute on Article objects. Closes SF bug #835332. This is a stub in the base class. _update_thread_index(): Call finished_update_article() when done. store_article(): squirrel away the html_body value when pickling the article. This only reduces bloat on new articles. See bin/rb-archfix to clean up older archives. --- Mailman/Archiver/pipermail.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Mailman/Archiver') diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py index 210030ed..ec8e46f6 100644 --- a/Mailman/Archiver/pipermail.py +++ b/Mailman/Archiver/pipermail.py @@ -126,9 +126,13 @@ class Database(DatabaseInterface): """Store article without message body to save space""" # TBD this is not thread safe! temp = article.body + temp2 = article.html_body article.body = [] + del article.html_body self.articleIndex[article.msgid] = pickle.dumps(article) article.body = temp + article.html_body = temp2 + # The Article class encapsulates a single posting. The attributes # are: @@ -239,6 +243,9 @@ class Article: def __repr__(self): return '
' + def finished_update_article(self): + pass + # Pipermail formatter class class T: @@ -486,6 +493,8 @@ class T: self.update_article(arcdir, a1, L[0], L[2]) else: del self.database.changed[key] + if L[0]: + L[0].finished_update_article() L = L[1:] # Rotate the list if msgid is None: L.append(msgid) -- cgit v1.2.3