feat: update

This commit is contained in:
2023-10-26 08:28:39 +08:00
parent 1172a2dd39
commit bdd2aa5b23
7 changed files with 64 additions and 44 deletions

View File

@@ -110,7 +110,7 @@ async def receive_heartbeat(ip: str):
async def receive_heartbeat_internal():
while 1:
timeout = 7
timeout = 70
# 删除超时的节点
cursor.execute("DELETE FROM nodes WHERE last_heartbeat < ?", (time.time() - timeout,))
conn.commit()