This commit is contained in:
DingZQ
2025-04-15 08:05:39 +08:00
parent 65ba34ff3a
commit a810456448

View File

@@ -1,4 +1,4 @@
import asyncio, os, io, json, time, pickle, redis, datetime, logging, threading, uvicorn, multiprocessing, asyncio, shutil, random impory asyncio, os, io, json, time, pickle, redis, datetime, logging, threading, uvicorn, multiprocessing, asyncio, shutil, random
from typing import * from typing import *
from urllib.request import Request from urllib.request import Request
@@ -2330,8 +2330,7 @@ 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:
# 使用自定义的反序列化函数 # 使用自定义的反序列化函数
loaded_dict = msgpack.unpackb(data, object_hook=decode_datetime) return msgpack.unpackb(data, object_hook=decode_datetime)
return loaded_dict
nodes_links: tuple = influxdb_api.query_all_records_by_date(query_date=querydate) nodes_links: tuple = influxdb_api.query_all_records_by_date(query_date=querydate)
results = { "nodes": nodes_links[0], results = { "nodes": nodes_links[0],