MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / conn_invalidated

Method conn_invalidated

test/engine/test_transaction.py:567–570  ·  view source on GitHub ↗
(dbapi_con, con_record, exception)

Source from the content-addressed store, hash-verified

565 # a connection with an XID present
566 @event.listens_for(eng, "invalidate")
567 def conn_invalidated(dbapi_con, con_record, exception):
568 if exception is not None:
569 dbapi_con.close()
570 raise exception
571
572 with eng.connect() as conn:
573 rec = conn.connection._connection_record

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected