添加接口示例

This commit is contained in:
pengtao 2019-07-17 10:19:57 +08:00
parent e335ef4da9
commit 41def5da6c

View File

@ -60,6 +60,7 @@ def send_cache_data():
key = f"ad::{line.get('gameid', 0)}::{line.get('locationid', 0)}"
if my_redis.exists(key):
my_redis.sadd(key, line['id'])
log.info(f"add{line['id']} to {key} !")
# 检查num是否已达到设定数值
num = my_redis.get(f"ad::{line['id']}::num")
if not num: