diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-10 14:38:21 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-10 14:38:21 +0100 |
commit | 9d06fb9cb105b33762a55b1d385da81c84507f71 (patch) | |
tree | 36e42e7b0b32c3ce7358a022a6fcabef0c39a5a5 /synapse/storage | |
parent | Newsfile (diff) | |
parent | Merge pull request #6191 from matrix-org/rav/fix_packaging (diff) | |
download | synapse-9d06fb9cb105b33762a55b1d385da81c84507f71.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/postgres_any
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/_base.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index a94cbc27d3..085b8ae871 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -31,7 +31,7 @@ from prometheus_client import Histogram from twisted.internet import defer from synapse.api.errors import StoreError -from synapse.logging.context import LoggingContext, PreserveLoggingContext +from synapse.logging.context import LoggingContext, make_deferred_yieldable from synapse.metrics.background_process_metrics import run_as_background_process from synapse.storage.engines import PostgresEngine, Sqlite3Engine from synapse.types import get_domain_from_id @@ -551,8 +551,9 @@ class SQLBaseStore(object): return func(conn, *args, **kwargs) - with PreserveLoggingContext(): - result = yield self._db_pool.runWithConnection(inner_func, *args, **kwargs) + result = yield make_deferred_yieldable( + self._db_pool.runWithConnection(inner_func, *args, **kwargs) + ) return result |