|
@@ -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
|
|
|
-
|