From bea9a5a142e2324fbd43aa19e6e4abc8640413dd Mon Sep 17 00:00:00 2001 From: zhanhuasheng Date: Wed, 25 Sep 2024 14:37:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utils/sql_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/sql_handler.py b/Utils/sql_handler.py index be1ef8f..a6a61c9 100644 --- a/Utils/sql_handler.py +++ b/Utils/sql_handler.py @@ -9,7 +9,7 @@ class SqlHandler: self.password = password self.account = account self.database = database - self.conn = pymysql.connect(host=address,port=port,user=account,password=password,database=database,cursorclass=pymysql.cursors.DictCursor) + self.conn = pymysql.connect(host=address,port=port,user=account,password=password,database=database,cursorclass=pymysql.cursors.DictCursor,connect_timeout=60) self.cursor = self.conn.cursor() def select_one_value(self,sql): -- GitLab