[Mailman-Developers] cron/gate_news watermark == 0

Jim Tittsler jwt@dskk.co.jp
Sun, 13 Feb 2000 18:28:01 +0900


--ZGiS0Q5IWpPtfppv
Content-Type: text/plain; charset=us-ascii

A watermark value of 0 is used for two different purposes in cron/gate_news:
 1. the group has never been gatewayed, so "catch up" to the highest article
    number
 2. the highest article number seen for the group is 0 (which can be a valid
    "high article number" before the first posting in a newly created
    newsgroup)
The result of this is the first article posted to the newly created newsgroup
fails to get gatewayed to the mailing list because the watermark for that
group is (still) 0 which is used as a flag to "catch up" so all that happens
is the watermark gets set to 1.

I believe I have fixed that in my copy by using the value None for the first
time a group is gatewayed, allowing proper processing when the watermark is
truly article number 0.

Jim


--ZGiS0Q5IWpPtfppv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gate_news.diff"

--- /usr/local/src/mailman/cron/gate_news	Fri Dec 17 14:38:49 1999
+++ cron/gate_news	Sun Feb 13 17:56:22 2000
@@ -134,8 +134,8 @@
         # Otherwise, let's figure out what needs to be done
         first = int(f)
         last = int(l)
-        wm = watermarks.get(name, 0)
-        if wm == 0:
+        wm = watermarks.get(name)
+        if wm is None:
             # This is the first time we've tried to gate this newsgroup.  We
             # essentially do a mass catch-up, otherwise we'd flood the mailing
             # list.  If you want to post all earlier messages, do this

--ZGiS0Q5IWpPtfppv--