liqian 1 year ago
parent
commit
e3dc676c81
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ad_xgboost_threshold_update.py

+ 3 - 0
ad_xgboost_threshold_update.py

@@ -127,6 +127,9 @@ def threshold_update(project, table, dt, app_type):
         # 写入redis
         threshold_key = f"{xgb_config['threshold_key_prefix']}{abtest_id}:{ab_code}"
         redis_helper.set_data_to_redis(key_name=threshold_key, value=threshold, expire_time=48 * 3600)
+    redis_helper.set_data_to_redis(key_name=xgb_config['threshold_record'],
+                                   value=str(threshold_record),
+                                   expire_time=2 * 24 * 3600)
     print("update threshold finished!")