summary refs log tree commit diff
path: root/synapse/util/async.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-30 01:21:33 +0000
committerMark Haines <mark.haines@matrix.org>2014-10-30 01:21:33 +0000
commitb29517bd013b82302b1a73072da8bfc39564dc1a (patch)
tree363ac928a18f2432b6d53c27dde2f2efb34b16a8 /synapse/util/async.py
parentfix mobile CSS layout (diff)
downloadsynapse-b29517bd013b82302b1a73072da8bfc39564dc1a.tar.xz
Add a request-id to each log line
Diffstat (limited to 'synapse/util/async.py')
-rw-r--r--synapse/util/async.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py
index 647ea6142c..3d3fbe182c 100644
--- a/synapse/util/async.py
+++ b/synapse/util/async.py
@@ -16,8 +16,11 @@
 
 from twisted.internet import defer, reactor
 
+from .logcontext import PreserveLoggingContext
 
+@defer.inlineCallbacks
 def sleep(seconds):
     d = defer.Deferred()
     reactor.callLater(seconds, d.callback, seconds)
-    return d
+    with PreserveLoggingContext():
+        yield d