调试 暂停广告继续播放

This commit is contained in:
pengtao 2019-09-19 19:53:06 +08:00
parent 9bc778ab55
commit 869afc4290
2 changed files with 3 additions and 1 deletions

View File

@ -112,7 +112,7 @@ class DispatchHandler(tornado.web.RequestHandler):
key_word = f"ad::{gameid}_*::{channelid}::{area}::*"
else:
return self.write({'errcode': 2, "errmsg": "key_word not set!"})
print(f"key_word={key_word}")
#print(f"key_word={key_word}")
ad_keys = my_redis.keys(key_word)
ids = []
if ad_keys:

View File

@ -169,6 +169,7 @@ def send_cache_data():
for line in remove_data:
try:
id, gameid, channelid, locationids, status = line
print(f"find remove data in {line} ")
for locationid in locationids.replace("[", "").replace("]", "").replace('"', "").split(','):
locationid = locationid.strip()
area_all = get_area_by_locationid(locationid)
@ -177,6 +178,7 @@ def send_cache_data():
area = area.strip()
key = f"ad::{gameid}_{locationid}::{channelid}::{area}::{locationid}"
values = f"{id}_{locationid}"
print(f"remove {values} from {key}")
if my_redis.sismember(key, values):
my_redis.srem(key, values)
my_redis.expire(f"adinfo::{values}::info", 1)