Browse Source

Merge branch 'flowpool-update' into pre-master

liqian 2 years ago
parent
commit
fc2f023156
1 changed files with 3 additions and 1 deletions
  1. 3 1
      recommend.py

+ 3 - 1
recommend.py

@@ -259,9 +259,11 @@ def video_recommend(request_id, mid, uid, size, top_K, flow_pool_P, app_type, al
     else:
         if recall_result_list[1]:
             redis_helper = RedisHelper()
-            flow_pool_P = redis_helper.get_data_from_redis(
+            quick_flow_pool_P = redis_helper.get_data_from_redis(
                 key_name=f"{config_.QUICK_FLOWPOOL_DISTRIBUTE_RATE_KEY_NAME_PREFIX}{config_.QUICK_FLOW_POOL_ID}"
             )
+            if quick_flow_pool_P:
+                flow_pool_P = quick_flow_pool_P
             data = {
                 'rov_pool_recall': recall_result_list[0],
                 'flow_pool_recall': recall_result_list[1]