Documentation update + little bugfix

This commit is contained in:
tonio
2009-11-04 18:05:45 +01:00
parent 8521a75a05
commit 363869a8c1
2 changed files with 8 additions and 10 deletions
+3 -3
View File
@@ -7,14 +7,14 @@ from django.conf import settings
if __name__ == "__main__":
conn = db.getconnection("amavis_quarantine")
try:
max_msg_days = getattr(settings, "MAX_MESSAGES_AGE")
max_messages_age = getattr(settings, "MAX_MESSAGES_AGE")
except AttributeError:
max_messages_age = 14
print "Deleting messages older than %d days..." % max_msg_days
print "Deleting messages older than %d days..." % max_messages_age
db.execute(conn, """
DELETE FROM msgs WHERE time_num < UNIX_TIMESTAMP()-%d*24*3600;
""" % max_msg_days)
""" % max_messages_age)
print "Deleting unreferenced e-mail addresses..."
db.execute(conn, """