Переглянути джерело

获取行销宝工号队列停顿时间放到最外面

lcl 2 роки тому
батько
коміт
d74de58478
2 змінених файлів з 5 додано та 5 видалено
  1. 1 1
      AppStart/Helper/GetRadioCardInfoService.cs
  2. 4 4
      Startup.cs

+ 1 - 1
AppStart/Helper/GetRadioCardInfoService.cs

@@ -100,7 +100,6 @@ public class GetRadioCardInfoService
                 else
                 {
                     function.WriteLog(DateTime.Now.ToString() + "\n" + result, "请求行销宝信息接口异常");
-                    Thread.Sleep(1800000);
                 }
             }
             catch (Exception ex)
@@ -108,6 +107,7 @@ public class GetRadioCardInfoService
                 function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "获取行销宝信息线程异常");
             }
             db.Dispose();
+            Thread.Sleep(1800000);
         }
     }
 

+ 4 - 4
Startup.cs

@@ -171,10 +171,10 @@ namespace MySystem
         private void initMainServer(string Env)
         {
             string dbName = "KxsMainServer";
-            // if(Env == "Production")
-            // {
-            //     dbName = "KxsProfitServer";
-            // }
+            if(Env == "Production")
+            {
+                dbName = "KxsProfitServer";
+            }
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
             System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = '" + dbName + "'");