durusmail: quixote-users: Re: Reusing connections quixote 2
Re: Reusing connections quixote 2
2006-11-07
2006-11-07
2006-11-07
2006-11-07
2006-11-07
2006-11-07
2006-11-08
2007-02-01
2007-02-01
2007-02-01
2006-11-08
2006-11-08
2006-11-08
2006-11-08
2006-11-09
2006-11-08
Re: Reusing connections quixote 2
Arturo FM
2007-02-01
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
reply