添加过期key日志
This commit is contained in:
parent
f21a168838
commit
3e6fe27d95
@ -154,20 +154,17 @@ class DispatchHandler(tornado.web.RequestHandler):
|
||||
key_word = f"adlist::{gameid}_*::{channelid}::{area}::*"
|
||||
else:
|
||||
pass
|
||||
print(f"- {key_word}")
|
||||
ad_keys = my_redis.keys(key_word)
|
||||
print(f"0 {ad_keys}")
|
||||
ids = []
|
||||
for ad_key in ad_keys:
|
||||
adlists = my_redis.get(ad_key)
|
||||
print(f"1 {adlists}")
|
||||
try:
|
||||
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)
|
||||
return self.write({'errcode': 2, "errmsg": f"get redis data failed!"})
|
||||
if ad_keys:
|
||||
for ad_key in ad_keys:
|
||||
adlists = my_redis.get(ad_key)
|
||||
try:
|
||||
for key in json.loads(adlists):
|
||||
ids.append(key)
|
||||
except Exception:
|
||||
log.error(f"get redis data failed!", exc_info=True)
|
||||
return self.write({'errcode': 2, "errmsg": f"get redis data failed!"})
|
||||
dist_ids = list(set(ids))
|
||||
info = []
|
||||
if not dist_ids:
|
||||
|
Loading…
x
Reference in New Issue
Block a user