liqian 2 years ago
parent
commit
97ad5f7229
2 changed files with 2 additions and 2 deletions
  1. 1 1
      recommend.py
  2. 1 1
      utils.py

+ 1 - 1
recommend.py

@@ -332,7 +332,7 @@ def update_redis_data(result, app_type, mid, last_rov_recall_key, top_K, expire_
     # ####### redis数据刷新
     try:
         # log_.info('====== update redis')
-        if mid:
+        if mid and mid != 'null':
             # mid为空时,不做预曝光和定位数据更新
             # 预曝光数据同步刷新到Redis, 过期时间为0.5h
             redis_helper = RedisHelper()

+ 1 - 1
utils.py

@@ -276,7 +276,7 @@ class FilterVideos(object):
         :param video_ids: 需过滤的视频列表 type-list
         :return: filtered_videos  过滤后的列表  type-list
         """
-        if not self.mid:
+        if not self.mid or self.mid == 'null':
             # mid为空时,不做预曝光过滤
             return video_ids
         # 根据Redis缓存中的数据过滤