diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-12-04 14:15:41 +0000 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-12-04 14:15:41 +0000 |
commit | 3c85a317d603bcbf2cc9c0b5b4ebcef1c9014db8 (patch) | |
tree | 9e531f36780ec5c39bd56671f6cac4afb1d10877 /synapse/util/__init__.py | |
parent | Merge pull request #419 from matrix-org/markjh/reuse_captcha_client (diff) | |
parent | Add comments to explain why we are hardcoding RUSAGE_THREAD (diff) | |
download | synapse-3c85a317d603bcbf2cc9c0b5b4ebcef1c9014db8.tar.xz |
Merge pull request #420 from matrix-org/markjh/resource_usage
Track the cpu used in the main thread by each logging context
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r-- | synapse/util/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py index d69c7cb991..2170746025 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py @@ -64,8 +64,7 @@ class Clock(object): current_context = LoggingContext.current_context() def wrapped_callback(*args, **kwargs): - with PreserveLoggingContext(): - LoggingContext.thread_local.current_context = current_context + with PreserveLoggingContext(current_context): callback(*args, **kwargs) with PreserveLoggingContext(): |