Browse Source

Merge branch 'sim_recall' of https://git.yishihui.com/algorithm/rov-server into sim_recall

linfan 1 year ago
parent
commit
c8ab03542e
1 changed files with 10 additions and 6 deletions
  1. 10 6
      recommend.py

+ 10 - 6
recommend.py

@@ -436,12 +436,16 @@ def new_video_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type
         if vId=='0':
             continue
         recall_name = per_item.get("pushFrom",'')
-        if recall_name=='fast_flow_recall':
-            fast_flow_set.add(vId)
-            all_flow_set.add(vId)
-        if recall_name=='flow_recall':
-            flow_flow_set.add(vId)
-            all_flow_set.add(vId)
+        flow_pool = per_item.get("flowPool", '')
+        if flow_pool != '':
+            flow_pool_id = int(flow_pool.split('#')[0])
+            if flow_pool_id == config_.QUICK_FLOW_POOL_ID:
+                fast_flow_set.add(vId)
+                all_flow_set.add(vId)
+            else:
+                flow_flow_set.add(vId)
+                all_flow_set.add(vId)
+
         #duplicate divide into
         if vId not in recall_dict:
             if recall_name == config_.PUSH_FROM['rov_recall_region_h']: