[Mailman-Developers] More on Mysql MemberAdaptor?
Yuan, Cain
cain.yuan at intel.com
Wed Nov 5 03:31:51 EST 2003
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
-----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: Wednesday, November 05, 2003 2:04 AM
To: mailman-developers at python.org
Subject: [Mailman-Developers] More on Mysql MemberAdaptor?
Further to my previous message, I've now got it reading config from
mm_cfg.py, verifying the connectivity to the mysql database on the
__init__ call, rather than throwing up(numerous) errors later on,
updated the README to reflect relevant changes, and just generally
cleaned things up a bit. That's RCS revision 1.13.
The only major problem I have is the return types for
{get,set}DeliveryStatus. I can't work out how I'm suppose to return a
tuple of values, and what they should be.
If someone could assist I'd be grateful :-)
K.
Begin forwarded message:
Date: Tue, 4 Nov 2003 15:27:45 +0000
From: Kyrian (List) <kyrian-list at ore.org>
To: mailman-developers at python.org
Subject: Mysql MemberAdaptor?
Hi All,
I'm presuming this is the appropriate list to post this to...
If anyone cares, I've written a Mysql MemberAdaptor based on the
OldStyleMemberships.py module, which seems to work ok. I've not done
much large scale testing as yet, though.
I've put it up at http://kyrian.ore.org/MailmanMysql/
Although I could use some pointers on the following:
- How to incorporate exception handling in python to trap DB errors, and
stop Mailman choking on them.
- How to incorporate some better configuration (you currently would
have to edit the module file directly to specify the database
parameters)
- How to properly incorporate it into mailman (if nobody minds that ;),
as it currently seems to require modifying MemberAdaptor.py directly
to activate it.
- Whether I've actually done it even half way right?
Either way, if anyone has anything to say about it, please go easy, I
kinda needed this thing, and delved into Python for the first time to do
so.
Oh, and I know the MySQL data structure I'm using is pretty atrocious,
as it was a best-guess, though I can always clean it up later...
I do hope I've not just spent several days reinventing the wheel here,
though... ;*)
Yours,
Kev.
--
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/--
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