mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-12 04:14:22 -05:00
Do logcontexts correctly
This commit is contained in:
parent
1432f7ccd5
commit
be0dfcd4a2
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
from twisted.internet import threads, reactor
|
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
|
import Queue
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ class BackgroundFileConsumer(object):
|
|||||||
|
|
||||||
self._producer = producer
|
self._producer = producer
|
||||||
self.streaming = streaming
|
self.streaming = streaming
|
||||||
self._finished_deferred = threads.deferToThread(self._writer)
|
self._finished_deferred = preserve_fn(threads.deferToThread)(self._writer)
|
||||||
if not streaming:
|
if not streaming:
|
||||||
self._producer.resumeProducing()
|
self._producer.resumeProducing()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user