fix: 修复session维护过程的bug

This commit is contained in:
Rock Chin
2022-12-08 13:37:33 +08:00
parent b06754506a
commit c9547c32eb
2 changed files with 7 additions and 1 deletions

View File

@@ -35,8 +35,8 @@ class DatabaseManager:
def heartbeat(self):
while True:
self.conn.ping(reconnect=True)
time.sleep(30)
self.conn.ping(reconnect=True)
def reconnect(self):
self.conn = pymysql.connect(host=self.host, port=self.port, user=self.user, password=self.password,