fix some error

This commit is contained in:
pengtao 2019-07-15 19:22:38 +08:00
parent cf19e485ea
commit 123dfe350a

View File

@ -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):