liqian 2 lat temu
rodzic
commit
b4820252d0
1 zmienionych plików z 27 dodań i 0 usunięć
  1. 27 0
      utils.py

+ 27 - 0
utils.py

@@ -217,6 +217,15 @@ def filter_video_status(video_ids):
             return filtered_videos
 
         except Exception as e:
+            log_.error(f"过滤失败, exception: {e}, traceback: {traceback.format_exc()}")
+            send_msg_to_feishu(
+                webhook=config_.FEISHU_ROBOT['server_robot'].get('webhook'),
+                key_word=config_.FEISHU_ROBOT['server_robot'].get('key_word'),
+                msg_text=f"rov-offline{config_.ENV_TEXT} - 过滤失败\n"
+                         f"retry count: {i}\n"
+                         f"exception: {e}\n"
+                         f"traceback: {traceback.format_exc()}"
+            )
             i += 1
             if i == 3:
                 return video_ids
@@ -276,6 +285,15 @@ def filter_video_status_with_applet_rec(video_ids, applet_rec_status):
             return filtered_videos
 
         except Exception as e:
+            log_.error(f"过滤失败, exception: {e}, traceback: {traceback.format_exc()}")
+            send_msg_to_feishu(
+                webhook=config_.FEISHU_ROBOT['server_robot'].get('webhook'),
+                key_word=config_.FEISHU_ROBOT['server_robot'].get('key_word'),
+                msg_text=f"rov-offline{config_.ENV_TEXT} - 过滤失败\n"
+                         f"retry count: {i}\n"
+                         f"exception: {e}\n"
+                         f"traceback: {traceback.format_exc()}"
+            )
             i += 1
             if i == 3:
                 return video_ids
@@ -336,6 +354,15 @@ def filter_video_status_app(video_ids):
             return filtered_videos
 
         except Exception as e:
+            log_.error(f"过滤失败, exception: {e}, traceback: {traceback.format_exc()}")
+            send_msg_to_feishu(
+                webhook=config_.FEISHU_ROBOT['server_robot'].get('webhook'),
+                key_word=config_.FEISHU_ROBOT['server_robot'].get('key_word'),
+                msg_text=f"rov-offline{config_.ENV_TEXT} - 过滤失败\n"
+                         f"retry count: {i}\n"
+                         f"exception: {e}\n"
+                         f"traceback: {traceback.format_exc()}"
+            )
             i += 1
             if i == 3:
                 return video_ids