mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-10-02 08:10:34 +00:00
less intensive availability check
This commit is contained in:
parent
a31783fc84
commit
2e5b9977e3
1 changed files with 3 additions and 3 deletions
|
@ -28,7 +28,7 @@ class BlobAvailabilityTracker(object):
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
log.info("Starting %s", self)
|
log.info("Starting %s", self)
|
||||||
self._check_popular.start(30)
|
self._check_popular.start(600)
|
||||||
self._check_mine.start(600)
|
self._check_mine.start(600)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
@ -70,7 +70,7 @@ class BlobAvailabilityTracker(object):
|
||||||
|
|
||||||
def _get_most_popular(self):
|
def _get_most_popular(self):
|
||||||
dl = []
|
dl = []
|
||||||
for (hash, _) in self._dht_node.get_most_popular_hashes(100):
|
for (hash, _) in self._dht_node.get_most_popular_hashes(10):
|
||||||
encoded = hash.encode('hex')
|
encoded = hash.encode('hex')
|
||||||
dl.append(self._update_peers_for_blob(encoded))
|
dl.append(self._update_peers_for_blob(encoded))
|
||||||
return defer.DeferredList(dl)
|
return defer.DeferredList(dl)
|
||||||
|
@ -87,7 +87,7 @@ class BlobAvailabilityTracker(object):
|
||||||
return defer.DeferredList(dl)
|
return defer.DeferredList(dl)
|
||||||
|
|
||||||
def sample(blobs):
|
def sample(blobs):
|
||||||
return random.sample(blobs, min(len(blobs), 100))
|
return random.sample(blobs, min(len(blobs), 10))
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
log.debug('==> Updating the peers for my blobs')
|
log.debug('==> Updating the peers for my blobs')
|
||||||
|
|
Loading…
Add table
Reference in a new issue