Best pratices to process request follow by commit/rollback

Asked by Erwan


I'm trying to use PySQLPool to manage a MySQL connection pool in wsgi application (with apache/mod_wsgi).
There is a case I don't succeed to implement.

How can I do a query without autocommit, then do some actions, and depending of the process, then apply a commit or a rollback ?
For now, I'm stuck with the q = PySQLPool.getNewQuery(with commitOnEnd False), then do a q.query(), but the at the end of the query(), the connection is returned to the pool, and I cannot use it to apply a commit or a rollback ...?

What is the way to achieve this ?



Question information

English Edit question
PySQLPool Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nikoleta Verbeck (nerdynick) said :

This is actually a current issue. I've been working on a revamp of the connection pooling logic to handle this but its been slow going.

Can you help with this problem?

Provide an answer of your own, or ask Erwan for more information if necessary.

To post a message you must log in.