返回广告列表前判断内容,不返回状态为null的信息
This commit is contained in:
parent
284733cb54
commit
f633966e3c
15
ad_tasks.py
15
ad_tasks.py
@ -170,13 +170,14 @@ def send_cache_data():
|
||||
id, gameid, channelid, locationids, status = line
|
||||
for locationid in locationids.replace("[", "").replace("]", "").replace('"', "").split(','):
|
||||
area_all = get_area_by_locationid(locationid)
|
||||
for area in area_all.split(','):
|
||||
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
|
||||
values = f"{id}_{locationid}"
|
||||
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!")
|
||||
if area_all:
|
||||
for area in area_all.split(','):
|
||||
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
|
||||
values = f"{id}_{locationid}"
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user