test: tpem test

This commit is contained in:
2023-10-24 20:01:56 +08:00
parent 45554c8856
commit f0e16d0a60
3 changed files with 4 additions and 4 deletions

View File

@@ -96,8 +96,8 @@ async def receive_heartbeat_internal():
while 1:
timeout = 7
# 删除超时的节点
# cursor.execute("DELETE FROM nodes WHERE last_heartbeat < ?", (time.time() - timeout,))
# conn.commit()
cursor.execute("DELETE FROM nodes WHERE last_heartbeat < ?", (time.time() - timeout,))
conn.commit()
await asyncio.sleep(timeout)
@app.get("/server/send_nodes_list")