mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:06:05 -04:00
Fix bug where we reconnected to the database on every query.
This commit is contained in:
parent
23c639ff32
commit
fabb7acd45
2 changed files with 2 additions and 1 deletions
|
@ -53,7 +53,7 @@ class PostgresEngine(object):
|
|||
return False
|
||||
|
||||
def is_connection_closed(self, conn):
|
||||
return bool(conn)
|
||||
return bool(conn.closed)
|
||||
|
||||
def lock_table(self, txn, table):
|
||||
txn.execute("LOCK TABLE %s in EXCLUSIVE MODE" % (table,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue