diff options
| author | Barry Warsaw | 2007-09-29 11:09:14 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-09-29 11:09:14 -0400 |
| commit | cbf2967239163e42cc2b25eece7bb5cb71b197fe (patch) | |
| tree | e8445a0af47c9c203107eea913f11dbc9229477b /Mailman/Queue/BounceRunner.py | |
| parent | 773980eb727b98c902b93894cafcd6bc7d22510d (diff) | |
| download | mailman-cbf2967239163e42cc2b25eece7bb5cb71b197fe.tar.gz mailman-cbf2967239163e42cc2b25eece7bb5cb71b197fe.tar.zst mailman-cbf2967239163e42cc2b25eece7bb5cb71b197fe.zip | |
Diffstat (limited to 'Mailman/Queue/BounceRunner.py')
| -rw-r--r-- | Mailman/Queue/BounceRunner.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Mailman/Queue/BounceRunner.py b/Mailman/Queue/BounceRunner.py index d398e1b4a..6ce7ef393 100644 --- a/Mailman/Queue/BounceRunner.py +++ b/Mailman/Queue/BounceRunner.py @@ -19,9 +19,9 @@ import os import re -import time import cPickle import logging +import datetime from email.MIMEMessage import MIMEMessage from email.MIMEText import MIMEText @@ -81,10 +81,11 @@ class BounceMixin: config.DATA_DIR, 'bounce-events-%05d.pck' % os.getpid()) self._bounce_events_fp = None self._bouncecnt = 0 - self._nextaction = time.time() + config.REGISTER_BOUNCES_EVERY + self._nextaction = (datetime.datetime.now() + + config.REGISTER_BOUNCES_EVERY) def _queue_bounces(self, listname, addrs, msg): - today = time.localtime()[:3] + today = datetime.date.today() if self._bounce_events_fp is None: self._bounce_events_fp = open(self._bounce_events_file, 'a+b') for addr in addrs: @@ -129,7 +130,7 @@ class BounceMixin: self._register_bounces() def _doperiodic(self): - now = time.time() + now = datetime.datetime.now() if self._nextaction > now or self._bouncecnt == 0: return # Let's go ahead and register the bounces we've got stored up |
