Re: Re: Reusing connections quixote 2

Arturo FM <[email protected]> Thu, 1 Feb 2007 10:54:41 +0100 (CET)
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
Hi!
Finally I have used this schema for reusing
connections:

- Environment: Debian GNU/Linux, MySQL, Quixote,
Apache, mod_scgi.

- Sessions persists in MySQL.

- I wrote a class that inherits of Publisher. This
class create a db connection in its constructor. Then
I use:
pub = get_publisher()
conn = pub.conn

- I wrote a method to close the connection:
def cleanup(self):
        self.conn.close()

- The application stop and start each 7 hours. This
avoid problems in MySQL. It is a cron job. 

Enjoy!!

Sorry, but my english isn't very good...


	
	
		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com