All, I was planning to, but I couldn't work out where to put it either. More research (or another API hook in mailman?) will be required methinks...
In theory MySQL should time them out after a while, but that's a bit of an unacceptable risk, really, since people might have lists that regularly get mailed to, and hence call the __init function, thus connection-flooding MySQL and causing it all to break down and go to hell. I also found a stupid bug in the Mysql bounce handling(again) which I've fixed and uploaded. The guy using this thing was supposed to give me a heads-up before using it on his list this morning, but didn't, so I can only assume it's all been going okay so far, since he didn't complain at me about it not working... ;-) K. On Sat, 8 Nov 2003 04:29:20 +0800 "Yuan, Cain" <[EMAIL PROTECTED]> wrote: > Hi Kev, > It's very cool to do a ping() before using those connections. > One more question here: where are you planning to add the code > for close those connections when mailman is ready to quit > (sometimes we need to shutdown mailman manually and of cause we > did not want to leave those connection in the system)? Python > has a __init() but seems no __exit functions( correct me if I > am wrong). > > Regards, > > Cain > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Behalf Of Kyrian (List) Sent: Saturday, November 08, 2003 1:40 AM > To: [EMAIL PROTECTED] > Subject: [Mailman-Developers] Mysql MemberAdaptor, v1.27 > > > > > Hi Kev, > > I had a look at the patch and have some questions here: why you > > establish a connection to MySQL and then close it in each > > function? AFAIK this will put much presure on MySQL if there > > are some people to subscribe/unscribe from the list. Why not > > just establish a ststic link to MySQL and then use it every time > > you need to access the DB? > > > > Cain > > In response to this, and the atrocious performance that I just > observed sending to a 60,000 or so member list, I've implemented a > connection sharing system in v1.27. > > I've removed all the explicit connect/cursor calls, and now they're > implemented by a connect on __init() and subsequently by a single > function; prodServerConnection() which does a ping() against the > server(which the MySQL docs say should do an automatic reconnect if > possible), checks for errors, if the ping() fails, tries a full > disconnect and reconnect, trapping any errors that occur. > > If that fails, it drops out. > > This hasn't been thoroughly tested yet, but it should work I think. > > I still need a little help with the bounce_info and delivery_status > flags, though, as they don't seem to be working, in spite of what > Mailman is logging(*), the database isn't being updated. > > K. > > *) Lots of these, but the database isn't being updated properly... > > Nov 07 17:25:14 2003 (6195) [EMAIL PROTECTED]: test current bounce > score: 1.0 > > -- > Kev Green, aka Kyrian. "Be excellent to each other" -- Bill & > Ted. > Email: kyrian@ore.org Web: http://kyrian.ore.org/ > ISP/Perl/PHP/Linux/Security Contractor, via http://www.orenet.co.uk/ > > _______________________________________________ > Mailman-Developers mailing list > [EMAIL PROTECTED] > http://mail.python.org/mailman/listinfo/mailman-developers -- Kev Green, aka Kyrian. "Be excellent to each other" -- Bill & Ted. Email: kyrian@ore.org Web: http://kyrian.ore.org/ ISP/Perl/PHP/Linux/Security Contractor, via http://www.orenet.co.uk/ _______________________________________________ Mailman-Developers mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/mailman-developers
