Преглед на файлове

feat: 开庭时间为空的,不过滤

许家凯 преди 1 година
родител
ревизия
cae632d3ef
променени са 2 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 3 3
      data_clean/exception/exception_handle.py
  2. 2 1
      data_clean/handle/company_court_open_announcement.py

+ 3 - 3
data_clean/exception/exception_handle.py

@@ -128,17 +128,17 @@ def exception_handle(func):
         try:
             result = await func(self, *args, **kwargs)
         except RulerValidationException as ex:
-            log.warn("session: %s 维度:%s ,detail: %s", session_id, tn, ex)
+            log.warn("session_id: %s 维度:%s ,detail: %s", session_id, tn, ex)
             data = args[0]
             data = _handle(data, tn, session_id, ex, original_data)
             await ruler_valid_exception_sink(ex, tn, data, session_id)
         except FetchException as ex:
-            log.error("session: %s 维度:%s ,detail: %s", session_id, tn, ex)
+            log.error("session_id: %s 维度:%s ,detail: %s", session_id, tn, ex)
             data = args[0]
             data = _handle(data, tn, session_id, ex, original_data)
             await fetch_exception_sink(ex, tn, data, session_id)
         except Exception as ex:
-            log.error("session: %s 维度:%s ,出现未知异常:%s", session_id, tn, repr(ex))
+            log.error("session_id: %s 维度:%s ,出现未知异常:%s", session_id, tn, repr(ex))
             data = args[0]
             data = _handle(data, tn, session_id, ex, original_data)
             await error_sink(ex, tn, data, session_id)

+ 2 - 1
data_clean/handle/company_court_open_announcement.py

@@ -56,7 +56,8 @@ async def open_ann_date(row_data: dict) -> dict:
     # 过滤开庭时间早于建国时间问题
     if 'start_date' in row_data:
         if not row_data['start_date']:
-            raise RulerValidationException("ccoa_002", "开庭时间为空")
+            # raise RulerValidationException("ccoa_002", "开庭时间为空")
+            return row_data
 
         this_date = str_2_date_time(row_data['start_date'])
         if this_date < establish_state_time: