forked from LBRYCommunity/lbry-sdk
dht_crawler: process older first, avoid discarding
This commit is contained in:
parent
174439f517
commit
965389b759
1 changed files with 2 additions and 1 deletions
|
@ -103,7 +103,8 @@ class Crawler:
|
||||||
|
|
||||||
def get_peers_needing_check(self):
|
def get_peers_needing_check(self):
|
||||||
return set([peer.to_kad_peer() for peer in self.recent_peers_query.filter(
|
return set([peer.to_kad_peer() for peer in self.recent_peers_query.filter(
|
||||||
sqla.or_(DHTPeer.last_check == None, DHTPeer.last_check < self.refresh_limit)).all()])
|
sqla.or_(DHTPeer.last_check == None,
|
||||||
|
DHTPeer.last_check < self.refresh_limit)).order_by(DHTPeer.last_seen.desc()).all()])
|
||||||
|
|
||||||
def add_peers(self, *peers):
|
def add_peers(self, *peers):
|
||||||
db_peers = []
|
db_peers = []
|
||||||
|
|
Loading…
Reference in a new issue