durusmail: quixote-users: Re: Reusing connections quixote 2
Reusing connections quixote 2
2006-11-06
Re: Reusing connections quixote 2
2006-11-06
Re: Reusing connections quixote 2
Neil Schemenauer
2006-11-06
Arturo FM  wrote:
> I'm writting a web application using Quixote 2. I need to reuse
> database connections. I have seen the Wiki but it's about Quixote
> 1.  I'm using mod_scgi (Apache) and the 'scgi_server.py' script.
> I wrote a new class that inherit of Publisher. In its constructor
> I connect to dabase. But, where I can to disconnect it?

scgi_server.py is designed for long running application servering
daemons and so there is no cleanup mechanism provided.  Normally a
DB connection is created when the application server starts (e.g.
when the publisher object gets created) and is kept open.

If you really need cleanup then I guess you could use the "atexit"
module.  Why do you think you need a cleanup method though?

  Neil

reply