Files
notifications-api/app
Alexey Bezhan 614a2dae2c Enable pessimistic DB connection disconnect handling
By default, SQLAlchemy will start a transaction with an
existing connection without checking that the connection
is still valid.

Enabling "pre-ping" makes the ORM send a `SELECT 1` when
acquiring a connection, which should help avoid some errors
caused by connections breaking during a DB failover.

The added statement has a constant overhead for all transactions,
so we should only keep it enabled when we're planning to switch
or upgrade the database server.

https://docs.sqlalchemy.org/en/latest/core/pooling.html#disconnect-handling-pessimistic
2018-11-30 15:41:58 +00:00
..
2018-11-26 12:53:39 +00:00
2018-11-26 12:53:39 +00:00
2018-10-26 18:02:41 +01:00
2018-10-26 17:54:53 +01:00
2018-11-26 12:53:39 +00:00