返回广告列表前判断内容,不返回状态为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
|
id, gameid, channelid, locationids, status = line
|
||||||
for locationid in locationids.replace("[", "").replace("]", "").replace('"', "").split(','):
|
for locationid in locationids.replace("[", "").replace("]", "").replace('"', "").split(','):
|
||||||
area_all = get_area_by_locationid(locationid)
|
area_all = get_area_by_locationid(locationid)
|
||||||
for area in area_all.split(','):
|
if area_all:
|
||||||
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
|
for area in area_all.split(','):
|
||||||
values = f"{id}_{locationid}"
|
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
|
||||||
if my_redis.sismember(key, values):
|
values = f"{id}_{locationid}"
|
||||||
my_redis.srem(key, values)
|
if my_redis.sismember(key, values):
|
||||||
my_redis.expire(f"adinfo::{values}::info", 1)
|
my_redis.srem(key, values)
|
||||||
log.info(f"remove {id} from {key} success!")
|
my_redis.expire(f"adinfo::{values}::info", 1)
|
||||||
|
log.info(f"remove {id} from {key} success!")
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error("拆解过期数据出错!", exc_info=True)
|
log.error("拆解过期数据出错!", exc_info=True)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user