diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index 1789e8a..cfdc9dd 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -62,7 +62,7 @@ def send_cache_data(): if my_redis.exists(key): my_redis.sadd(key, line['id']) # 检查num是否已达到设定数值 - num = my_redis.get(f"{line['id']::num") + num = my_redis.get(f"{line['id']}::num") if not num: num = 0 if line['ad_num'] > 0 and line['ad_num'] <= num: @@ -77,8 +77,8 @@ def send_cache_data(): my_redis.hmset(f"{line['id']}::info", line) -len_all = len(all) -log.info(f"write {len_all} to cache!") + len_all = len(all) + log.info(f"write {len_all} to cache!") class DispatchHandler(tornado.web.RequestHandler):