Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Verified Commit 00583341 authored by Victor's avatar Victor
Browse files

[bug] add code to obey protocol pause and stop

Stream production wasn't pausing or stopping as asked by protocol.
parent ed498fad
......@@ -67,6 +67,11 @@ class BlobsUpstreamProducer(object):
consumer.write(json.dumps(self.blobs_lengths) + '\n')
for blob_id, _ in self.blobs_lengths:
if self.stop:
if self.pause:
yield self.sleep(0.001)
blob_fd = yield self.db.get(blob_id, namespace=self.namespace)
doc_info = DocInfo(blob_id, FIXED_REV)
crypter = BlobEncryptor(doc_info, blob_fd, secret=self.secret,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment