|
@@ -176,6 +176,9 @@ def update_threshold(threshold_record_old, threshold_record_new):
|
|
|
threshold_old = redis_helper.get_data_from_redis(key_name=key_name)
|
|
|
if threshold_old is None:
|
|
|
continue
|
|
|
+ # 原阈值为0时,加10**(-5)兜底处理
|
|
|
+ if float(threshold_old) == 0:
|
|
|
+ threshold_old = float(threshold_old) + 10**(-5)
|
|
|
# 计算新的阈值
|
|
|
if group_key == 'mean_group':
|
|
|
if threshold_param_old['mean_group'] == 0:
|