~sambuddhabasu1/mailman/fix_mailman_run_error

« back to all changes in this revision

Viewing changes to src/mailman/handlers/to_digest.py

  • Committer: Barry Warsaw
  • Date: 2012-03-26 12:04:00 UTC
  • Revision ID: barry@list.org-20120326120400-jfezy6cg60ygod7k
Architecture
------------
 * Internally, all datetimes are kept in the UTC timezone, however because of
   LP: #280708, they are stored in the database in naive format.
 * `received_time` is now added to the message metadata by the LMTP runner
   instead of by `Switchboard.enqueue()`.  This latter no longer depends on
   `received_time` in the metadata.
 * The `ArchiveRunner` no longer acquires a lock before it calls the
   individual archiver implementations, since not all of them need a lock.  If
   they do, the implementations must acquire said lock themselves.

Configuration
-------------
 * New configuration variables `clobber_date` and `clobber_skew` supported in
   every `[archiver.<name>]` section.  These are used to determine under what
   circumstances a message destined for a specific archiver should have its
   `Date:` header clobbered.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
 
28
28
import os
29
 
import datetime
30
29
 
31
30
from zope.interface import implements
32
31
 
35
34
from mailman.email.message import Message
36
35
from mailman.interfaces.digests import DigestFrequency
37
36
from mailman.interfaces.handler import IHandler
 
37
from mailman.utilities.datetime import now as right_now
38
38
from mailman.utilities.mailbox import Mailbox
39
39
 
40
40
 
85
85
 
86
86
def bump_digest_number_and_volume(mlist):
87
87
    """Bump the digest number and volume."""
88
 
    now = datetime.datetime.now()
 
88
    now = right_now()
89
89
    if mlist.digest_last_sent_at is None:
90
90
        # There has been no previous digest.
91
91
        bump = False