Refine
This commit is contained in:
5
main.py
5
main.py
@@ -2330,9 +2330,10 @@ async def fastapi_query_all_records_by_date(querydate: str) -> dict[str, list]:
|
|||||||
|
|
||||||
data = redis_client.get(cache_key)
|
data = redis_client.get(cache_key)
|
||||||
if data:
|
if data:
|
||||||
logger.info(f"return from cache redis")
|
|
||||||
# 使用自定义的反序列化函数
|
# 使用自定义的反序列化函数
|
||||||
return msgpack.unpackb(data, object_hook=decode_datetime)
|
results = msgpack.unpackb(data, object_hook=decode_datetime)
|
||||||
|
logger.info(f"return from cache redis")
|
||||||
|
return results
|
||||||
|
|
||||||
logger.info(f"query from influxdb")
|
logger.info(f"query from influxdb")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user