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