From f93bbd6bc3550fa7557af5e22cceed446fbc92fd Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 29 Oct 2019 12:46:29 -0400 Subject: [PATCH] improve reflector logging --- lbry/lbry/stream/managed_stream.py | 2 ++ lbry/lbry/stream/reflector/client.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/lbry/stream/managed_stream.py b/lbry/lbry/stream/managed_stream.py index a649ddc52..ef03e1342 100644 --- a/lbry/lbry/stream/managed_stream.py +++ b/lbry/lbry/stream/managed_stream.py @@ -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) diff --git a/lbry/lbry/stream/reflector/client.py b/lbry/lbry/stream/reflector/client.py index 73185b725..7a8032c99 100644 --- a/lbry/lbry/stream/reflector/client.py +++ b/lbry/lbry/stream/reflector/client.py @@ -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):