BlobAvailabilityTracker.sample bug, remove whitespace
This commit is contained in:
parent
5a76a03cb6
commit
0044d6cf75
2 changed files with 1 additions and 4 deletions
|
@ -80,7 +80,6 @@ class BlobAvailabilityTracker(object):
|
||||||
d = self._get_most_popular()
|
d = self._get_most_popular()
|
||||||
d.addCallback(lambda _: self._set_mean_peers())
|
d.addCallback(lambda _: self._set_mean_peers())
|
||||||
|
|
||||||
|
|
||||||
def _update_mine(self):
|
def _update_mine(self):
|
||||||
def _get_peers(blobs):
|
def _get_peers(blobs):
|
||||||
dl = []
|
dl = []
|
||||||
|
@ -89,7 +88,7 @@ class BlobAvailabilityTracker(object):
|
||||||
return defer.DeferredList(dl)
|
return defer.DeferredList(dl)
|
||||||
|
|
||||||
def sample(blobs):
|
def sample(blobs):
|
||||||
return random.sample(blobs, 100)
|
return random.sample(blobs, min(len(blobs), 100))
|
||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
log.debug('==> Updating the peers for my blobs')
|
log.debug('==> Updating the peers for my blobs')
|
||||||
|
|
|
@ -919,7 +919,6 @@ class LBRYumWallet(Wallet):
|
||||||
func = getattr(self.cmd_runner, cmd.name)
|
func = getattr(self.cmd_runner, cmd.name)
|
||||||
return defer.succeed(func(*args))
|
return defer.succeed(func(*args))
|
||||||
|
|
||||||
|
|
||||||
# run commands as a deferToThread, lbryum commands that only make
|
# run commands as a deferToThread, lbryum commands that only make
|
||||||
# queries to lbryum server should be run this way
|
# queries to lbryum server should be run this way
|
||||||
def _run_cmd_as_defer_to_thread(self, command_name, *args):
|
def _run_cmd_as_defer_to_thread(self, command_name, *args):
|
||||||
|
@ -1055,7 +1054,6 @@ class LBRYumWallet(Wallet):
|
||||||
return defer.succeed(val)
|
return defer.succeed(val)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LBRYcrdAddressRequester(object):
|
class LBRYcrdAddressRequester(object):
|
||||||
implements([IRequestCreator])
|
implements([IRequestCreator])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue