Explorar el Código

update xfzd timeouttime

James hace 2 años
padre
commit
8f7e615066
Se han modificado 1 ficheros con 6 adiciones y 4 borrados
  1. 6 4
      ytServiceCore/core.cpp

+ 6 - 4
ytServiceCore/core.cpp

@@ -3925,7 +3925,7 @@ void Core::time_out()
         }
     }
 
-    if((tmp_time-xfzdworktime)>86400){
+    if((tmp_time-xfzdworktime)>86000){
         xfzdworktime=tmp_time;
         for(int i=0;i<XfzdDevList.length();i++){
             time_t tmp_time = time(static_cast<time_t *>(nullptr));
@@ -4406,11 +4406,13 @@ void Core::time_out()
     }
     if(sqlList2.length()>0){
         QSqlDatabase recdb;
-        if(QSqlDatabase::contains("rec_db"))
+        if(QSqlDatabase::contains("rec_db")){
             recdb = QSqlDatabase::database("rec_db");
-        else
+        }else{
             recdb = QSqlDatabase::addDatabase("QSQLITE","rec_db");
-        recdb.setDatabaseName(QString("db/watchdoglog%1.db").arg(QDate::currentDate().toString("yyyyMMdd")));
+        }
+        QString name = QString("db/watchdoglog%1.db").arg(QDate::currentDate().toString("yyyyMMdd"));
+        recdb.setDatabaseName(name);
         if(recdb.open()){
             if(!chk_table("ypsync_t_rec",recdb.tables()))
             {