Refine
This commit is contained in:
5
main.py
5
main.py
@@ -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 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)
|
||||
if data:
|
||||
# 使用自定义的反序列化函数
|
||||
loaded_dict = msgpack.unpackb(data, object_hook=decode_datetime)
|
||||
return loaded_dict
|
||||
return msgpack.unpackb(data, object_hook=decode_datetime)
|
||||
|
||||
nodes_links: tuple = influxdb_api.query_all_records_by_date(query_date=querydate)
|
||||
results = { "nodes": nodes_links[0],
|
||||
|
||||
Reference in New Issue
Block a user