瀏覽代碼

다시 추가 해 놓음

2DU 9 年之前
父節點
當前提交
08c9dbb8a6
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      app.py

+ 6 - 0
app.py

@@ -84,6 +84,12 @@ def start():
 conn = pymysql.connect(host = data['host'], user = data['user'], password = data['pw'], charset = 'utf8mb4')
 curs = conn.cursor(pymysql.cursors.DictCursor)
 
+curs.execute("use mysql")
+try:
+    curs.execute("set global wait_timeout = 315360000")
+except:
+    test = 1
+
 try:
     curs.execute("use " + data['db'])
 except: