From 29c2d5715dafa6a56b8a14d8eef89bc34571bdaa Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sat, 11 Jun 2022 21:11:37 -0300 Subject: [PATCH] dht_crawler: fix last_seen update --- scripts/dht_crawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dht_crawler.py b/scripts/dht_crawler.py index 85a35fa4d..b41097909 100644 --- a/scripts/dht_crawler.py +++ b/scripts/dht_crawler.py @@ -149,7 +149,7 @@ class Crawler: to_peer_id=peer_id) for peer_id in db_peer_ids } - self.db.query(DHTPeer).filter(DHTPeer.node_id.in_(set(db_peer_ids))).update( + self.db.query(DHTPeer).filter(DHTPeer.peer_id.in_(set(db_peer_ids))).update( {DHTPeer.last_seen: datetime.datetime.utcnow()}) self.db.query(DHTConnection).filter(DHTConnection.from_peer_id == target_peer_id).delete() self.db.add_all(connections)