All,

Changes:

* AFAIK (having looked around a bit), the __del__() method should
achieve this disconnect, etc. at the right time under python, and I've
implemented one, which closes the relevant DB connections, but I don't
know if it's ever called by the rest of Mailman... grepping the source
doesn't seem to indicate that it is...

* Added in some verbosity options to the module, not much as
yet, but they're a start.

* Moved stuff around to using syslog() rather than print() which seems
to be the "Mailman way".

* Documentation updates.

At this point, notwithstanding the fact that the bounce and delivery
status stuff isn't working (which I will need help to sort out, and it
doesn't seem to be forthcoming), I think this thing is now "finished".

K.

PS. I'll shortly be heavily testing v1.38, but it's as yet only been
slightly tested.

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&#64;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&#64;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

Reply via email to