|
@@ -114,6 +114,23 @@ def process_with_region(app_type, data_key, rule_key, region, stop_distribute_vi
|
|
|
values=stop_distribute_video_id_list,
|
|
|
expire_time=2 * 3600
|
|
|
)
|
|
|
+
|
|
|
+ if rule_key == 'rule4':
|
|
|
+ key_name = f"{config_.RECALL_KEY_NAME_PREFIX_DUP3_REGION_24H_H}" \
|
|
|
+ f"{region}.{app_type}.{data_key}.{rule_key}." \
|
|
|
+ f"{datetime.datetime.strftime(now_date, '%Y%m%d')}.{now_h}"
|
|
|
+ if not redis_helper.key_exists(key_name=key_name):
|
|
|
+ if now_h == 0:
|
|
|
+ redis_date = now_date - datetime.timedelta(days=1)
|
|
|
+ redis_h = 23
|
|
|
+ else:
|
|
|
+ redis_date = now_date
|
|
|
+ redis_h = now_h - 1
|
|
|
+ key_name = f"{config_.RECALL_KEY_NAME_PREFIX_DUP3_REGION_24H_H}" \
|
|
|
+ f"{region}.{app_type}.{data_key}.{rule_key}." \
|
|
|
+ f"{datetime.datetime.strftime(redis_date, '%Y%m%d')}.{redis_h}"
|
|
|
+ redis_helper.remove_value_from_zset(key_name=key_name, value=stop_distribute_video_id_list)
|
|
|
+
|
|
|
|
|
|
key_name = f"{config_.RECALL_KEY_NAME_PREFIX_DUP_REGION_H}" \
|
|
|
f"{region}.{app_type}.{data_key}.{rule_key}." \
|