fix some error
This commit is contained in:
parent
1520889b20
commit
43ecffc2d9
@ -60,7 +60,10 @@ def send_cache_data():
|
||||
key = f"{line.get('gameid', 0)}::{line.get('locationid', 0)}"
|
||||
if my_redis.exists(key):
|
||||
# 检查num是否已达到设定数值
|
||||
num = my_redis.get(f"{key}:num") or 0
|
||||
num = my_redis.get(f"{key}:num")
|
||||
if not num:
|
||||
num=0
|
||||
print("num was ",num)
|
||||
if line['num'] != -1 and line['num'] <= num:
|
||||
# 该广告已播放达到次数,从缓存中清除
|
||||
my_redis.srem(key, line['id'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user