Commit 6348a28e authored by ZZH's avatar ZZH

fix temp rc qr 2023-6-16

parent a6e4d703
...@@ -11,7 +11,7 @@ async def get_td_engine_data(url, sql): ...@@ -11,7 +11,7 @@ async def get_td_engine_data(url, sql):
url, data=sql, timeout=50, url, data=sql, timeout=50,
headers={"Authorization": f"Basic {token}"} headers={"Authorization": f"Basic {token}"}
) )
log.info(f"resp_str:{resp_str},status:{status}") # log.info(f"resp_str:{resp_str},status:{status}")
if status != 200: if status != 200:
return False, None return False, None
results = json.loads(resp_str) results = json.loads(resp_str)
......
...@@ -142,8 +142,10 @@ async def normal_rate_of_location(cid): ...@@ -142,8 +142,10 @@ async def normal_rate_of_location(cid):
lids = list(location_map.keys()) lids = list(location_map.keys())
adio_currents = [] adio_currents = []
if lids: if lids:
key = f"real_time:adio:{SETTING.mysql_db}" prefix = f"real_time:adio:{SETTING.mysql_db}"
adio_currents = await RedisUtils().hmget(key, *lids) keys = [f"{prefix}:{lid}" for lid in lids]
adio_currents = await RedisUtils().mget(keys)
log.info(f"adio_currents:{adio_currents}")
adio_infos = {} adio_infos = {}
for index, item_byte in enumerate(adio_currents): for index, item_byte in enumerate(adio_currents):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment