mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 12:04:53 -04:00
Track the cpu used in the main thread by each logging context
This commit is contained in:
parent
b8680b82c3
commit
48a2526d62
3 changed files with 72 additions and 10 deletions
|
@ -30,8 +30,7 @@ def debug_deferreds():
|
|||
context = LoggingContext.current_context()
|
||||
|
||||
def restore_context_callback(x):
|
||||
with PreserveLoggingContext():
|
||||
LoggingContext.thread_local.current_context = context
|
||||
with PreserveLoggingContext(context):
|
||||
return fn(x)
|
||||
|
||||
return restore_context_callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue