summary refs log tree commit diff
path: root/synapse/storage/database.py
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-01-07 11:38:31 +0000
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-01-07 11:38:31 +0000
commitf53801b2b535dc90e0d92ce45153876c7cae1242 (patch)
tree12aa5f7777b320b248043e3c875428b9cfbbd950 /synapse/storage/database.py
parentUse fancy `trace` function instead (diff)
downloadsynapse-f53801b2b535dc90e0d92ce45153876c7cae1242.tar.xz
Use `setattr` because direct assignment fails
Diffstat (limited to 'synapse/storage/database.py')
-rw-r--r--synapse/storage/database.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py

index 319c451856..1c1d76520f 100644 --- a/synapse/storage/database.py +++ b/synapse/storage/database.py
@@ -107,7 +107,7 @@ def make_pool( with LoggingContext("db.on_new_connection"): # HACK Patch the connection's commit function so that we can see # how long it's taking from Jaeger. - conn.commit = trace(conn.commit, "db.conn.commit") + setattr(conn, "commit", trace(conn.commit, "db.conn.commit")) engine.on_new_connection( LoggingDatabaseConnection(conn, engine, "on_new_connection")