diff options
author | Erik Johnston <erik@matrix.org> | 2021-05-05 10:25:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-05-05 10:25:54 +0100 |
commit | cdeb6050ea1a3b08c850a730098edc6cc176ee70 (patch) | |
tree | ef43c255dbf4a5e92f286dbc2d19188deaf61159 | |
parent | Merge branch 'erikj/jemalloc_stats' into erikj/test_send (diff) | |
download | synapse-cdeb6050ea1a3b08c850a730098edc6cc176ee70.tar.xz |
Log contexts
-rw-r--r-- | synapse/crypto/keyring.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py index 03d6664a87..984a4be54d 100644 --- a/synapse/crypto/keyring.py +++ b/synapse/crypto/keyring.py @@ -43,7 +43,11 @@ from synapse.api.errors import ( from synapse.config.key import TrustedKeyServer from synapse.events import EventBase from synapse.events.utils import prune_event_dict -from synapse.logging.context import make_deferred_yieldable, run_in_background +from synapse.logging.context import ( + PreserveLoggingContext, + make_deferred_yieldable, + run_in_background, +) from synapse.metrics.background_process_metrics import run_as_background_process from synapse.storage.keys import FetchKeyResult from synapse.types import JsonDict @@ -158,7 +162,8 @@ class _Queue: results = await self.process_items(values) for value, deferred in next_values: - deferred.callback(results.get(value.server_name, {})) + with PreserveLoggingContext(): + deferred.callback(results.get(value.server_name, {})) except Exception as e: for _, deferred in next_values: |