Package trac :: Package db :: Module pool

Module pool

source code

Classes
  TimeoutError
Exception raised by the connection pool when no connection has become available after a given timeout.
  PooledConnection
A database connection that can be pooled.
  ConnectionPoolBackend
A process-wide LRU-based connection pool.
  ConnectionPool
Functions
 
try_rollback(cnx)
Resets the Connection in a safe way, returning True when it succeeds.
source code

Imports: threading, os, time, ConnectionWrapper, _


Function Details

try_rollback(cnx)

source code 

Resets the Connection in a safe way, returning True when it succeeds.

The rollback we do for safety on a Connection can fail at critical times because of a timeout on the Connection.