|
@@ -2,6 +2,7 @@
|
|
|
@author: luojunhui
|
|
|
"""
|
|
|
from applications.match_alg.recall import recall_videos
|
|
|
+from applications.log import logging
|
|
|
|
|
|
|
|
|
def jac_score(d1, d2):
|
|
@@ -54,16 +55,28 @@ async def best_choice(params_obj, trace_id, search_videos):
|
|
|
if search_list:
|
|
|
best_search_tuple = best_video_id(search_list)
|
|
|
if best_search_tuple[1] > 0:
|
|
|
+ logging(
|
|
|
+ code="1003",
|
|
|
+ info="search_score---{}".format(best_search_tuple[1])
|
|
|
+ )
|
|
|
return best_search_tuple[0]
|
|
|
else:
|
|
|
best_pq_tuple = best_video_id(pq_list)
|
|
|
if best_pq_tuple[1] > 0:
|
|
|
+ logging(
|
|
|
+ code="1003",
|
|
|
+ info="pq_score---{}".format(best_pq_tuple[1])
|
|
|
+ )
|
|
|
return best_pq_tuple[0]
|
|
|
else:
|
|
|
return None
|
|
|
else:
|
|
|
best_pq_tuple = best_video_id(pq_list)
|
|
|
if best_pq_tuple[1] > 0:
|
|
|
+ logging(
|
|
|
+ code="1003",
|
|
|
+ info="pq_score---{}".format(best_pq_tuple[1])
|
|
|
+ )
|
|
|
return best_pq_tuple[0]
|
|
|
else:
|
|
|
return None
|