[Mailman-Developers] Mysql MemberAdaptor, v1.27

Yuan, Cain cain.yuan at intel.com
Fri Nov 7 15:29:20 EST 2003


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: mailman-developers-bounces+cain.yuan=intel.com at python.org [mailto:mailman-developers-bounces+cain.yuan=intel.com at python.org]On Behalf Of Kyrian (List)
Sent: Saturday, November 08, 2003 1:40 AM
To: mailman-developers at python.org
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) XYZ at MYDOMAIN.co.uk: 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
Mailman-Developers at python.org
http://mail.python.org/mailman/listinfo/mailman-developers



More information about the Mailman-Developers mailing list