[Sqlalchemy-tickets] Issue #3712: Documentation issue with Pessimistic Disconnect Handler Example (
Brought to you by:
zzzeek
From: Alexander M. <iss...@bi...> - 2016-05-11 16:56:25
|
New issue 3712: Documentation issue with Pessimistic Disconnect Handler Example https://bitbucket.org/zzzeek/sqlalchemy/issues/3712/documentation-issue-with-pessimistic Alexander Mohr: The example documented here: http://docs.sqlalchemy.org/en/latest/core/pooling.html#disconnect-handling-pessimistic has an issue in that it doesn't account for the connection.should_close_with_result status. If this is set it means that the select() will close the connection, causing the original request to work on a closed connection and failing. My trivial fix was to stash the state, set it to false, and then resolve after doing the select 1. |