diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-30 01:21:33 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-30 01:21:33 +0000 |
commit | b29517bd013b82302b1a73072da8bfc39564dc1a (patch) | |
tree | 363ac928a18f2432b6d53c27dde2f2efb34b16a8 /synapse/util/async.py | |
parent | fix mobile CSS layout (diff) | |
download | synapse-b29517bd013b82302b1a73072da8bfc39564dc1a.tar.xz |
Add a request-id to each log line
Diffstat (limited to 'synapse/util/async.py')
-rw-r--r-- | synapse/util/async.py | 5 |
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 |