[Mailman-Users] patch implementing FIFO for mailman queue in 2.0.13
Myk Melez
myk at mozilla.org
Sat Apr 17 00:50:30 CEST 2004
The mailman FAQ (http://www.python.org/cgi-bin/faqw-mm.py?req=all#6.6)
says about the incoming message queue processor: "It's STILL not FIFO
(and this is why replies get seen before messages being replied to, and
why digests have messages scrambles; Barry and I have talked at length
about this and the queueing should be FIFO in 2.1"
Here's a small patch for qrunner in mailman 2.0.13 that makes it process
the mail queue in first-in-first-out order (FIFO) rather than randomly:
--- qrunner.orig Fri Jan 23 13:51:01 2004
+++ qrunner Fri Apr 16 12:21:35 2004
@@ -190,7 +190,9 @@
t0 = time.time()
msgcount = 0
allkids = {}
- for file in os.listdir(mm_cfg.QUEUE_DIR):
+ files = os.listdir(mm_cfg.QUEUE_DIR)
+ files.sort(lambda
x,y:cmp(os.path.getmtime(os.path.join(mm_cfg.QUEUE_DIR, x)),
os.path.getmtime(os.path.join(mm_cfg.QUEUE_DIR, y))))
+ for file in files:
# Keep the qrunner lock alive for a while longer
lock.refresh()
root, ext = os.path.splitext(os.path.join(mm_cfg.QUEUE_DIR, file))
It seems to work, but is there anything I'm missing that depends on the
old behavior and will break with this patch applied?
-myk
More information about the Mailman-Users
mailing list