summary refs log tree commit diff
path: root/synapse/util/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-19 18:03:57 +0000
committerErik Johnston <erik@matrix.org>2014-11-19 18:03:57 +0000
commit19977b465913c3cb263d88884e16f9dc13f2a05e (patch)
tree6015e4155502d34fd8aa35fc32094d8c29981a0a /synapse/util/__init__.py
parentMerge branch 'release-v0.4.2' of github.com:matrix-org/synapse (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into release-v0.5.0 (diff)
downloadsynapse-19977b465913c3cb263d88884e16f9dc13f2a05e.tar.xz
Merge branch 'release-v0.5.0' of github.com:matrix-org/synapse v0.5.0
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r--synapse/util/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py

index c9a73b0413..e57fb0e914 100644 --- a/synapse/util/__init__.py +++ b/synapse/util/__init__.py
@@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from synapse.util.logcontext import LoggingContext from twisted.internet import reactor @@ -35,7 +36,11 @@ class Clock(object): return self.time() * 1000 def call_later(self, delay, callback): - return reactor.callLater(delay, callback) + current_context = LoggingContext.current_context() + def wrapped_callback(): + LoggingContext.thread_local.current_context = current_context + callback() + return reactor.callLater(delay, wrapped_callback) def cancel_call_later(self, timer): timer.cancel()