[Mailman-Developers] Outgoin queue sugestion
Dan Ohnesorg, admin of POWER
Dan@feld.cvut.cz
Sat, 26 Sep 1998 21:38:30 +0200
On 25 Sep 98, at 16:16, The Dragon De Monsyne wrote:
> On Fri, 25 Sep 1998, Dan Ohnesorg, admin of POWER wrote:
>
> > I become sometimes irriting error messages cannot unlink....... by
> > queue processing. So I sugest this modification of dequeue
> > function
> >
> > def dequeueMessage(msg):
> > import os
> > try:
> > os.unlink(msg)
> > except:
> > from Logging.StampedLogger import StampedLogger
> > l = StampedLogger("queue", "DequeueMessage", immediate=1)
> > l.write("Cannot remove:\t %s\n" % msg)
> > l.flush()
> >
> > I currently dont know why this error happens, I still searching.
>
> Oh, I know why this happens. It's related to the duplicate
> delivery problem. Another proccess has delivered the queued message out
> from under the first one. (and deleted the queue file, which is why the
> first process cannot delete the message. )
Yes so it is probably done, but I think some messages, which are
afected with this error aren't send duplicate.
>
> I've actually fixed this problem, by the simple expediant of
> making all of the Mailman programs simply queue, and not try to deliver,
> outgoing messages. Then I have a modified run_queue program that runs
> continuously, de-queueing and delivering messages. Works great, sofar.
> If anyone's interested in the diffs. let me know. (I mentioned
> this whence I first did this, bout a month ago, but noone seemed
> interested then. )
Send me this, please, but I am working on another sugestion. I
will made this: when one process begins with delivery, it makes
lock file mm_l.1 and so on. Locked files are skipped by another
processes. Sucessfull delivery removes both lock and data files,
unsuccesfull only lock file.
Danger on my solution is, that when mailman dies, the file is
locked forever (or probalby I can delete lock files older than X
from crond).
Some opinion to this?
cheers
dan
________________________________________
DDDDDD
DD DD Dan Ohnesorg, supervisor on POWER
DD OOOO Dan@feld.cvut.cz
DD OODDOO Dep. of Power Engineering
DDDDDD OO CTU FEL Prague, Bohemia
OO OO work: +420 2 24352785;+420 2 24972109
OOOO home: +420 311 679679;+420 311 679311
________________________________________
Pesimista vidi v ementalskem syru jen ty diry.