diff options
author | bwarsaw <> | 2003-12-24 17:09:30 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-12-24 17:09:30 +0000 |
commit | 8b2cb37d61dc71c95c6bab860ef6b2da98516cfd (patch) | |
tree | 8941ce64714d3ab9372585d27d7284d95ae6358e /Mailman/Archiver/pipermail.py | |
parent | 443295a032807d94f71d0b4dcb2108cd1b58745f (diff) | |
download | mailman2-8b2cb37d61dc71c95c6bab860ef6b2da98516cfd.tar.gz mailman2-8b2cb37d61dc71c95c6bab860ef6b2da98516cfd.tar.xz mailman2-8b2cb37d61dc71c95c6bab860ef6b2da98516cfd.zip |
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.
Diffstat (limited to 'Mailman/Archiver/pipermail.py')
-rw-r--r-- | Mailman/Archiver/pipermail.py | 9 |
1 files changed, 9 insertions, 0 deletions
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 '<Article ID = '+repr(self.msgid)+'>' + 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) |