summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2017-02-24 10:50:14 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2017-03-20 18:01:23 -0400
commitf881dae8179b94f72ab0dc85d8f62be8c9ce2fe0 (patch)
tree5cb60158bc13584b5350b9d7f87604d1e0b4350a /lib/sqlalchemy/orm/attributes.py
parent9e06ab17b9d3083cd45540f714234d1d5826da32 (diff)
downloadsqlalchemy-f881dae8179b94f72ab0dc85d8f62be8c9ce2fe0.tar.gz
Integrate "pre-ping" into connection pool.
Added native "pessimistic disconnection" handling to the :class:`.Pool` object. The new parameter :paramref:`.Pool.pre_ping`, available from the engine as :paramref:`.create_engine.pool_pre_ping`, applies an efficient form of the "pre-ping" recipe featured in the pooling documentation, which upon each connection check out, emits a simple statement, typically "SELECT 1", to test the connection for liveness. If the existing connection is no longer able to respond to commands, the connection is transparently recycled, and all other connections made prior to the current timestamp are invalidated. Change-Id: I89700d0075e60abd2250e54b9bd14daf03c71c00 Fixes: #3919
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
0 files changed, 0 insertions, 0 deletions