添加过期key日志

This commit is contained in:
pengtao 2019-10-10 19:30:29 +08:00
parent 54993be155
commit 26985491f0

View File

@ -157,9 +157,11 @@ class DispatchHandler(tornado.web.RequestHandler):
ad_keys = my_redis.keys(key_word)
ids = []
for ad_key in ad_keys:
adlists = my_redis.smembers(ad_key)
adlists = my_redis.get(ad_key)
print(f"1 {adlists}")
try:
for key in adlists:
for key in json.loads(adlists):
print(f"2 {key}")
ids.append(key)
except Exception:
log.error(f"get redis data failed!", exc_info=True)