diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-12-03 21:03:01 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-12-03 21:03:01 +0000 |
commit | 48a2526d629fc33207cf864de36f3cff706a1c4c (patch) | |
tree | ea842b015eeab9a87ec51df74ea6f982d629ca59 /synapse/util/__init__.py | |
parent | Merge pull request #414 from matrix-org/erikj/if_not_exists (diff) | |
download | synapse-48a2526d629fc33207cf864de36f3cff706a1c4c.tar.xz |
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(): |