Re: Reusing connections quixote 2

Neil Schemenauer <[email protected]> Mon, 6 Nov 2006 20:33:35 +0000 (UTC)
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
Arturo FM <[email protected]> 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