improve reflector logging

This commit is contained in:
Jack Robison 2019-10-29 12:46:29 -04:00
parent ca12d655ea
commit f93bbd6bc3
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 2 additions and 2 deletions

View file

@ -434,6 +434,8 @@ class ManagedStream:
we_have = [
blob_hash for blob_hash in needed if blob_hash in self.blob_manager.completed_blob_hashes
]
log.info("we have %i/%i needed blobs needed by reflector for lbry://%s#%s", len(we_have), len(needed),
self.claim_name, self.claim_id)
for blob_hash in we_have:
await protocol.send_blob(blob_hash)
sent.append(blob_hash)

View file

@ -98,8 +98,6 @@ class StreamReflectorClient(asyncio.Protocol):
self.reflected_blobs.append(sd_blob.blob_hash)
else:
log.warning("Reflector failed to receive descriptor %s", sd_blob.blob_hash[:8])
if needed:
log.info("Reflector needs %i blobs for %s", len(needed), sd_blob.blob_hash[:8])
return sent_sd, needed
async def send_blob(self, blob_hash: str):