调整location area字段名称

This commit is contained in:
pengtao 2019-09-17 11:57:36 +08:00
parent 3066ee0169
commit 22ef44c285

View File

@ -177,9 +177,11 @@ def send_cache_data():
print(f"area={area_all}") print(f"area={area_all}")
for area in area_all.split(','): for area in area_all.split(','):
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}" key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
if my_redis.sismember(key, id): values = f"{id}_{locationid}"
my_redis.srem(key, id) pdb.set_trace()
my_redis.expire(f"ad::{id}::info", 1) if my_redis.sismember(key, values):
my_redis.srem(key, values)
my_redis.expire(f"adinfo::{values}::info", 1)
log.info(f"remove {id} from {key} success!") log.info(f"remove {id} from {key} success!")
except Exception: except Exception:
log.error("拆解过期数据出错!", exc_info=True) log.error("拆解过期数据出错!", exc_info=True)