forked from LBRYCommunity/lbry-sdk
This commit is contained in:
parent
778d3826ab
commit
330862e487
2 changed files with 4 additions and 1 deletions
|
@ -485,7 +485,8 @@ class Config(CLIConfig):
|
||||||
previous_names=['announce_head_blobs_only']
|
previous_names=['announce_head_blobs_only']
|
||||||
)
|
)
|
||||||
concurrent_blob_announcers = Integer(
|
concurrent_blob_announcers = Integer(
|
||||||
"Number of blobs to iteratively announce at once", 10, previous_names=['concurrent_announcers']
|
"Number of blobs to iteratively announce at once, set to 0 to disable", 10,
|
||||||
|
previous_names=['concurrent_announcers']
|
||||||
)
|
)
|
||||||
max_connections_per_download = Integer(
|
max_connections_per_download = Integer(
|
||||||
"Maximum number of peers to connect to while downloading a blob", 5,
|
"Maximum number of peers to connect to while downloading a blob", 5,
|
||||||
|
|
|
@ -19,6 +19,8 @@ class BlobAnnouncer:
|
||||||
self.announce_queue: typing.List[str] = []
|
self.announce_queue: typing.List[str] = []
|
||||||
|
|
||||||
async def _announce(self, batch_size: typing.Optional[int] = 10):
|
async def _announce(self, batch_size: typing.Optional[int] = 10):
|
||||||
|
if not batch_size:
|
||||||
|
return
|
||||||
if not self.node.joined.is_set():
|
if not self.node.joined.is_set():
|
||||||
await self.node.joined.wait()
|
await self.node.joined.wait()
|
||||||
blob_hashes = await self.storage.get_blobs_to_announce()
|
blob_hashes = await self.storage.get_blobs_to_announce()
|
||||||
|
|
Loading…
Reference in a new issue