diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-10 13:47:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-10 13:47:50 +0100 |
commit | 933034e2feaae56640e4bbb7f58c85e4bbf720c9 (patch) | |
tree | a23b9fa75cfb4c2d754c785a2ef0ab1660d2e6dc /synapse/storage/_base.py | |
parent | Add domain validation when creating room with list of invitees (#6121) (diff) | |
parent | Fixup comments (diff) | |
download | synapse-933034e2feaae56640e4bbb7f58c85e4bbf720c9.tar.xz |
Merge pull request #6127 from matrix-org/erikj/patch_inner
Add more log context checks when patching inlineCallbacks
Diffstat (limited to 'synapse/storage/_base.py')
-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 abe16334ec..06cc14fcd1 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -30,7 +30,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 @@ -550,8 +550,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 |