diff options
author | Erik Johnston <erik@matrix.org> | 2016-02-04 10:22:44 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-02-08 14:26:45 +0000 |
commit | 2c1fbea5319db2c64fa486adb32b5e66680b6daf (patch) | |
tree | f34fb636206664ffa531e30d703469ff1a6d3a19 /synapse/storage/_base.py | |
parent | Add metrics to pushers (diff) | |
download | synapse-2c1fbea5319db2c64fa486adb32b5e66680b6daf.tar.xz |
Fix up logcontexts
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index cfb87d9328..2e97ac84a8 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -15,7 +15,7 @@ import logging from synapse.api.errors import StoreError -from synapse.util.logcontext import preserve_context_over_fn, LoggingContext +from synapse.util.logcontext import LoggingContext, PreserveLoggingContext from synapse.util.caches.dictionary_cache import DictionaryCache from synapse.util.caches.descriptors import Cache import synapse.metrics @@ -298,10 +298,10 @@ class SQLBaseStore(object): func, *args, **kwargs ) - result = yield preserve_context_over_fn( - self._db_pool.runWithConnection, - inner_func, *args, **kwargs - ) + with PreserveLoggingContext(): + result = yield self._db_pool.runWithConnection( + inner_func, *args, **kwargs + ) for after_callback, after_args in after_callbacks: after_callback(*after_args) @@ -326,10 +326,10 @@ class SQLBaseStore(object): return func(conn, *args, **kwargs) - result = yield preserve_context_over_fn( - self._db_pool.runWithConnection, - inner_func, *args, **kwargs - ) + with PreserveLoggingContext(): + result = yield self._db_pool.runWithConnection( + inner_func, *args, **kwargs + ) defer.returnValue(result) |