mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 02:49:24 -05:00
Move definition of paused_producer to __init__
This commit is contained in:
parent
a177325b49
commit
28b338ed9b
@ -43,6 +43,10 @@ class BackgroundFileConsumer(object):
|
|||||||
# True if PushProducer, false if PullProducer
|
# True if PushProducer, false if PullProducer
|
||||||
self.streaming = False
|
self.streaming = False
|
||||||
|
|
||||||
|
# For PushProducers, indicates whether we've paused the producer and
|
||||||
|
# need to call resumeProducing before we get more data.
|
||||||
|
self.paused_producer = False
|
||||||
|
|
||||||
# Queue of slices of bytes to be written. When producer calls
|
# Queue of slices of bytes to be written. When producer calls
|
||||||
# unregister a final None is sent.
|
# unregister a final None is sent.
|
||||||
self.bytes_queue = Queue.Queue()
|
self.bytes_queue = Queue.Queue()
|
||||||
@ -71,8 +75,6 @@ class BackgroundFileConsumer(object):
|
|||||||
if not streaming:
|
if not streaming:
|
||||||
self.producer.resumeProducing()
|
self.producer.resumeProducing()
|
||||||
|
|
||||||
self.paused_producer = False
|
|
||||||
|
|
||||||
def unregisterProducer(self):
|
def unregisterProducer(self):
|
||||||
"""Part of IProducer interface
|
"""Part of IProducer interface
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user