call blob_completed after receiving blob

This commit is contained in:
Jack 2016-08-18 05:58:13 -04:00
parent f5508fcdf1
commit c046cd02d5
2 changed files with 2 additions and 0 deletions

View file

@ -44,6 +44,7 @@ class BlobAvailabilityHandler(object):
d = self._get_available_blobs(queries[self.query_identifiers[0]]) d = self._get_available_blobs(queries[self.query_identifiers[0]])
def set_field(available_blobs): def set_field(available_blobs):
log.debug("available blobs: %s", str(available_blobs))
return {'available_blobs': available_blobs} return {'available_blobs': available_blobs}
d.addCallback(set_field) d.addCallback(set_field)

View file

@ -89,6 +89,7 @@ class ReflectorServer(Protocol):
else: else:
self.incoming_blob = blob self.incoming_blob = blob
self.blob_finished_d, self.blob_write, self.cancel_write = blob.open_for_writing(self.peer) self.blob_finished_d, self.blob_write, self.cancel_write = blob.open_for_writing(self.peer)
self.blob_finished_d.addCallback(lambda _: self.blob_manager.blob_completed(blob))
return {'send_blob': True} return {'send_blob': True}
def close_blob(self): def close_blob(self):