Update of /cvsroot/mailman/mailman/Mailman/Archiver
In directory sc8-pr-cvs1:/tmp/cvs-serv4533
Modified Files:
Tag: Release_2_1-maint
pipermail.py
Log Message:
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.
Index: pipermail.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Archiver/pipermail.py,v
retrieving revision 2.22.2.2
retrieving revision 2.22.2.3
diff -u -d -r2.22.2.2 -r2.22.2.3
--- pipermail.py 22 Sep 2003 02:40:51 -0000 2.22.2.2
+++ pipermail.py 24 Dec 2003 17:09:30 -0000 2.22.2.3
@@ -126,9 +126,13 @@
"""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 @@
def __repr__(self):
return '<Article ID = '+repr(self.msgid)+'>'
+ def finished_update_article(self):
+ pass
+
# Pipermail formatter class
class T:
@@ -486,6 +493,8 @@
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)
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org