diff options
author | Erik Johnston <erik@matrix.org> | 2018-01-18 11:57:23 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-01-18 11:57:57 +0000 |
commit | be0dfcd4a29859f4c707c2b3cf1da38c5115d251 (patch) | |
tree | 6fa05d04b98c9e52dd148954cd15fcb98bf93f15 /synapse/util/file_consumer.py | |
parent | Move test stuff to tests (diff) | |
download | synapse-be0dfcd4a29859f4c707c2b3cf1da38c5115d251.tar.xz |
Do logcontexts correctly
Diffstat (limited to 'synapse/util/file_consumer.py')
-rw-r--r-- | synapse/util/file_consumer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/file_consumer.py b/synapse/util/file_consumer.py index 3241035247..90a2608d6f 100644 --- a/synapse/util/file_consumer.py +++ b/synapse/util/file_consumer.py @@ -15,7 +15,7 @@ from twisted.internet import threads, reactor -from synapse.util.logcontext import make_deferred_yieldable +from synapse.util.logcontext import make_deferred_yieldable, preserve_fn import Queue @@ -70,7 +70,7 @@ class BackgroundFileConsumer(object): self._producer = producer self.streaming = streaming - self._finished_deferred = threads.deferToThread(self._writer) + self._finished_deferred = preserve_fn(threads.deferToThread)(self._writer) if not streaming: self._producer.resumeProducing() |