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