소스 검색

取消同步订单的休眠等待,直接抛出异常

dodo hold 1 년 전
부모
커밋
a1d33600a2
2개의 변경된 파일65개의 추가작업 그리고 64개의 파일을 삭제
  1. 12 2
      molilian.core/Plus/Alimama/crawler.cs
  2. 53 62
      molilian.core/Plus/Alimama/orders.cs

+ 12 - 2
molilian.core/Plus/Alimama/crawler.cs

@@ -611,13 +611,23 @@ namespace molilian.core
                 var response = client.Request(url);
 
                 var body = response.Body();
-                var root = body.Convert2JsonElement();
+                JsonElement root = default;
+                try
+                {
+                    root = body.Convert2JsonElement();
+                }
+                catch (Exception)
+                {
+                    _ = new LoggerLibrary("error", "SaveReportOverview").Info(url, body).SaveAsync();
+
+                    throw new Exception("SaveReportOverview body不是 json格式");
+                } 
 
                 int resultCode = root.Read<int>("resultCode", 0);
                 bool success = root.Read("success", false);
                 if (!success)
                 {
-                    _ = new LoggerLibrary("report", "error")
+                    _ = new LoggerLibrary("error", "SaveReportOverview")
                         .Info(url, body)
                         .SaveAsync();
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 53 - 62
molilian.core/Plus/Alimama/orders.cs


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.