[Twisted-Python] twisted.web and MySQLdb

Nathan Seven scosol at yahoo.com
Tue Oct 28 16:10:19 MST 2003


--- phil at bubblehouse.org wrote:
> 
> I'm using MySQLdb to interface with my sql server,
> but i'm not really sure
> what to do with my connection object once it's
> created. i want to put it
> somewhere that will be easy to access for the rest
> of the modules, but
> obviously i don't want it to be persisted when the
> TAP is saved....
.

Hmmm- well I'm just getting started here as well- but
yeah, I don't remember any mentioned way of
selectively removing state information for objects.
I don't like the whole state-saving stuff at all- I'm
doing atomic DB stuff, so my "state" above all is
maintained on the DB itself.
The Twisted clients are just basically dumb
transaction handlers.

> but i
> don't know how to make it so the connection object
> isn't persisted, but
> created new each time the server is started...

Hmmm- would a simple solution be to simply
re-initialize the connection(s) upon any restart?
(can a restart even be detected with .app?)

=====
--
live- http://www.thedenofsin.org/
to- AIM: IMFDUP
_born to violate._




More information about the Twisted-Python mailing list