Update of /cvsroot/mailman/mailman/Mailman/Queue
In directory sc8-pr-cvs1:/tmp/cvs-serv20690

Modified Files:
      Tag: Release_2_1-maint
        Switchboard.py 
Log Message:
MarshalSwitchboard._ext_write(), ASCIISwitchboard._ext_write():
Promote SYNC_AFTER_WRITE to a Defaults.py/mm_cfg.py variable after
all.


Index: Switchboard.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Queue/Switchboard.py,v
retrieving revision 2.15.2.3
retrieving revision 2.15.2.4
diff -u -d -r2.15.2.3 -r2.15.2.4
--- Switchboard.py      22 Sep 2003 02:34:11 -0000      2.15.2.3
+++ Switchboard.py      10 Oct 2003 04:11:12 -0000      2.15.2.4
@@ -56,10 +56,6 @@
     True = 1
     False = 0
 
-# This flag causes Mailman to fsync() the file after writing and flushing its
-# contents.  While this ensures the data is written to disk, avoiding data
-# loss, it is a huge performance killer.
-SYNC_AFTER_WRITE = False
 # This flag causes messages to be written as pickles (when True) or text files
 # (when False).  Pickles are more efficient because the message doesn't need
 # to be re-parsed every time it's unqueued, but pickles are not human readable.
@@ -255,7 +251,7 @@
         marshal.dump(dict, fp)
         # Make damn sure that the data we just wrote gets flushed to disk
         fp.flush()
-        if SYNC_AFTER_WRITE:
+        if mm_cfg.SYNC_AFTER_WRITE:
             os.fsync(fp.fileno())
         fp.close()
 
@@ -327,7 +323,7 @@
             print >> fp, '%s = %s' % (k, repr(v))
         # Make damn sure that the data we just wrote gets flushed to disk
         fp.flush()
-        if SYNC_AFTER_WRITE:
+        if mm_cfg.SYNC_AFTER_WRITE:
             os.fsync(fp.fileno())
         fp.close()
 



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to