[Checkins] SVN: zope.sendmail/trunk/ QueueProcessorThread now
accepts an optional parameter 'interval' for
Andreas Jung
andreas at andreas-jung.com
Fri Aug 24 12:48:03 EDT 2007
Log message for revision 79240:
QueueProcessorThread now accepts an optional parameter 'interval' for
defining how often to processes the mail queue (default is 3 second)
Changed:
U zope.sendmail/trunk/README.txt
U zope.sendmail/trunk/src/zope/sendmail/delivery.py
-=-
Modified: zope.sendmail/trunk/README.txt
===================================================================
--- zope.sendmail/trunk/README.txt 2007-08-24 15:47:23 UTC (rev 79239)
+++ zope.sendmail/trunk/README.txt 2007-08-24 16:48:03 UTC (rev 79240)
@@ -48,7 +48,8 @@
3.5.0a1 (unreleased)
--------------------
-...
+QueueProcessorThread now accepts an optional parameter 'interval' for
+defining how often to processes the mail queue (default is 3 second)
3.4.0 (2007-08-20)
--------------------
Modified: zope.sendmail/trunk/src/zope/sendmail/delivery.py
===================================================================
--- zope.sendmail/trunk/src/zope/sendmail/delivery.py 2007-08-24 15:47:23 UTC (rev 79239)
+++ zope.sendmail/trunk/src/zope/sendmail/delivery.py 2007-08-24 16:48:03 UTC (rev 79240)
@@ -145,9 +145,11 @@
log = logging.getLogger("QueueProcessorThread")
__stopped = False
+ interval = 3.0 # process queue every X second
- def __init__(self):
+ def __init__(self, interval=3.0):
threading.Thread.__init__(self)
+ self.interval = interval
def setMaildir(self, maildir):
"""Set the maildir.
@@ -217,7 +219,7 @@
filename, exc_info=True)
else:
if forever:
- time.sleep(3)
+ time.sleep(self.interval)
# A testing plug
if not forever:
More information about the Checkins
mailing list