Julien Cristau pushed to branch master at snapshot / snapshot
Commits:
1160d9c7 by Baptiste Beauplat at 2022-09-28T19:32:02+02:00
Add PoolError to the list of error to recover from on close
This particular error case was previously hidden by the ROLLBACK statement
failing first when the connection was closed. Since it has been removed
to avoid rollback on non-transactional queries, updating the exception
list to recover from with PoolError.
- - - - -
370be955 by Julien Cristau at 2022-09-28T17:55:44+00:00
Merge branch 'fix/rollback-outside-transaction' into 'master'
Add PoolError to the list of error to recover from on close
See merge request snapshot-team/snapshot!6
- - - - -
1 changed file:
- web/app/snapshot/lib/dbinstance.py
Changes:
=====================================
web/app/snapshot/lib/dbinstance.py
=====================================
@@ -99,7 +99,8 @@ class DBInstance:
def close(self):
try:
self.pool.putconn(self.conn)
- except (psycopg2.OperationalError, psycopg2.InterfaceError):
+ except (psycopg2.OperationalError, psycopg2.InterfaceError,
+ psycopg2.pool.PoolError):
# Excluding from coverage (see above)
if not self.conn.closed: # pragma: no cover
self.pool.putconn(self.conn, close=True)
View it on GitLab:
https://salsa.debian.org/snapshot-team/snapshot/-/compare/0d07573b8eebd5040d8811105822f347c0dc1944...370be95586a301d6407e33b2253be64af70e5aab
--
View it on GitLab:
https://salsa.debian.org/snapshot-team/snapshot/-/compare/0d07573b8eebd5040d8811105822f347c0dc1944...370be95586a301d6407e33b2253be64af70e5aab
You're receiving this email because of your account on salsa.debian.org.