Commit bea9a5a1 authored by zhanhuasheng's avatar zhanhuasheng

修改数据库连接超时时间

parent b79c972d
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment