From 22ef44c2857d381b02a6ff75c7e3eaf4d81aaaa6 Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 17 Sep 2019 11:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4location=20area=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ad_tasks.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ad_tasks.py b/ad_tasks.py index 5ac8885..9e4071f 100644 --- a/ad_tasks.py +++ b/ad_tasks.py @@ -177,9 +177,11 @@ def send_cache_data(): print(f"area={area_all}") for area in area_all.split(','): key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}" - if my_redis.sismember(key, id): - my_redis.srem(key, id) - my_redis.expire(f"ad::{id}::info", 1) + values = f"{id}_{locationid}" + pdb.set_trace() + 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!") except Exception: log.error("拆解过期数据出错!", exc_info=True)