Browse Source

Merge branch '2024-12-11-luojunhui-traceId-improve' of Server/title_with_video into 2024-09-23newDbTasks

luojunhui 4 months ago
parent
commit
3c332043f8
1 changed files with 16 additions and 1 deletions
  1. 16 1
      server/api/get_off_videos.py

+ 16 - 1
server/api/get_off_videos.py

@@ -117,6 +117,15 @@ class GetOffVideos(object):
         else:
             return False
 
+    async def check_trace_id_startswith(self):
+        """
+        trace_id是否以search开头
+        """
+        if self.trace_id.startswith('search'):
+            return True
+        else:
+            return False
+
     async def deal(self):
         """
         :return:
@@ -125,6 +134,13 @@ class GetOffVideos(object):
         if params_error:
             return params_error
         else:
+            trace_id_process_flag = await self.check_trace_id_startswith()
+            if not trace_id_process_flag:
+                return {
+                    "traceId": self.trace_id,
+                    "msg": "do not process trace id"
+                }
+
             trace_id_exist_flag = await self.check_trace_id()
             if trace_id_exist_flag:
                 return await self.push_video_into_queue()
@@ -137,4 +153,3 @@ class GetOffVideos(object):
                     api="get_off_videos"
                 )
                 return response
-