diff options
| author | Barry Warsaw | 2009-02-04 07:00:56 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-02-04 07:00:56 -0500 |
| commit | b93b16bea10a1983bd784d56703518134f538d08 (patch) | |
| tree | 14c0e17243908377f903eb7af73cdfff72ebf53c /src/mailman/database | |
| parent | bbbe644f21ef956e0b94a2d7ba9dd73e97846e3d (diff) | |
| download | mailman-b93b16bea10a1983bd784d56703518134f538d08.tar.gz mailman-b93b16bea10a1983bd784d56703518134f538d08.tar.zst mailman-b93b16bea10a1983bd784d56703518134f538d08.zip | |
Massive digester rework.
This moves actual digest creation and sending into a new queue runner. That
way, digest creation does not block the main incoming processor. Lots of code
clean up and reorganization too, and many fixes.
digest_last_sent_at: Make this a DateTime
digest_size_threshold: Make this a Float
digest_volume_frequency: Make this an Enum
DigestFrequency: new enum
Fix up IMailingList interface to reflect reality.
In Runner base class, allow for msg.get_sender() to return a False value. If
this happens (as it can with the empty marker messages used to signal the
digester that there's work to do), just use the list's preferred language.
Give the retry.py and incoming.py queue runner modules some proper epilogues.
The EmptyingRunner (for testing) logs itself as the runner its wrapping.
The digest file name now ends in .mmdf since that's the format we're using.
Add 'create_list' to doctest globals.
Add a Mailbox class to add support for the context manager protocol.
Diffstat (limited to 'src/mailman/database')
| -rw-r--r-- | src/mailman/database/mailinglist.py | 6 | ||||
| -rw-r--r-- | src/mailman/database/mailman.sql | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman/database/mailinglist.py b/src/mailman/database/mailinglist.py index 8803a5fa4..e380a71b1 100644 --- a/src/mailman/database/mailinglist.py +++ b/src/mailman/database/mailinglist.py @@ -66,7 +66,7 @@ class MailingList(Model): admin_responses = Pickle() postings_responses = Pickle() request_responses = Pickle() - digest_last_sent_at = Float() + digest_last_sent_at = DateTime() one_last_digest = Pickle() volume = Int() last_post_time = DateTime() @@ -108,8 +108,8 @@ class MailingList(Model): digest_header = Unicode() digest_is_default = Bool() digest_send_periodic = Bool() - digest_size_threshold = Int() - digest_volume_frequency = Int() + digest_size_threshold = Float() + digest_volume_frequency = Enum() digestable = Bool() discard_these_nonmembers = Pickle() emergency = Bool() diff --git a/src/mailman/database/mailman.sql b/src/mailman/database/mailman.sql index b098ed13b..61d48285a 100644 --- a/src/mailman/database/mailman.sql +++ b/src/mailman/database/mailman.sql @@ -37,7 +37,7 @@ CREATE TABLE mailinglist ( admin_responses BLOB, postings_responses BLOB, request_responses BLOB, - digest_last_sent_at NUMERIC(10, 2), + digest_last_sent_at TIMESTAMP, one_last_digest BLOB, volume INTEGER, last_post_time TIMESTAMP, @@ -77,7 +77,7 @@ CREATE TABLE mailinglist ( digest_is_default BOOLEAN, digest_send_periodic BOOLEAN, digest_size_threshold INTEGER, - digest_volume_frequency INTEGER, + digest_volume_frequency TEXT, digestable BOOLEAN, discard_these_nonmembers BLOB, emergency BOOLEAN, |
