lcl hace 1 mes
padre
commit
93f0221c18
Se han modificado 1 ficheros con 9 adiciones y 2 borrados
  1. 9 2
      Util/Queue/PushHelper.cs

+ 9 - 2
Util/Queue/PushHelper.cs

@@ -27,7 +27,14 @@ namespace MySystem
         {
             while (true)
             {
-                DoSomeThing();
+                try
+                {
+                    DoSomeThing();
+                }
+                catch(Exception ex)
+                {
+                    function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "通用推送日志异常");
+                }
                 Thread.Sleep(1000);
             }
         }
@@ -141,7 +148,7 @@ namespace MySystem
                     sql += " order by id limit 10";
                     DataTable dt = CustomerSqlConn.dtable(sql, AppConfig.Base.SqlConnStr);
                     foreach(DataRow dr in dt.Rows)
-                    {                        
+                    {
                         SortedList<string, string> obj = new SortedList<string, string>();
                         foreach(DataColumn dc in dt.Columns)
                         {