aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorbwarsaw <>2003-10-10 04:11:12 +0000
committerbwarsaw <>2003-10-10 04:11:12 +0000
commitf527eace6728e075f43d2f2e3d2474a855ae06b6 (patch)
tree4959a54653b7091ab3a178241aa4f0d2aa25ff97 /Mailman
parent9677a0b73f1004bd1646f5c1f96fa85e0d1af80b (diff)
downloadmailman2-f527eace6728e075f43d2f2e3d2474a855ae06b6.tar.gz
mailman2-f527eace6728e075f43d2f2e3d2474a855ae06b6.tar.xz
mailman2-f527eace6728e075f43d2f2e3d2474a855ae06b6.zip
MarshalSwitchboard._ext_write(), ASCIISwitchboard._ext_write():
Promote SYNC_AFTER_WRITE to a Defaults.py/mm_cfg.py variable after all.
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Queue/Switchboard.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py
index 4a56223d..6093623e 100644
--- a/Mailman/Queue/Switchboard.py
+++ b/Mailman/Queue/Switchboard.py
@@ -56,10 +56,6 @@ except NameError:
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 @@ class MarshalSwitchboard(_Switchboard):
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 @@ class ASCIISwitchboard(_Switchboard):
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()