2du 5 năm trước cách đây
mục cha
commit
b2ccb3e629
1 tập tin đã thay đổi với 3 bổ sung5 xóa
  1. 3 5
      app.py

+ 3 - 5
app.py

@@ -282,12 +282,10 @@ if set_data['db_type'] == 'sqlite':
         print('Back up state : Turn off')
 
 def mysql_dont_off():
-    try:
-        urllib.request.urlopen('http://localhost:' + server_set['port'] + '/')
-    except:
-        pass
+    curs = conn.cursor()
+    curs.execute(db_change("select title from data limit 1"))
 
-    threading.Timer(60 * 60 * 6, mysql_dont_off).start()
+    threading.Timer(60 * 60 * 1, mysql_dont_off).start()
 
 mysql_dont_off()