From a810456448c04fc420f8d7e7678bbd61daaa9878 Mon Sep 17 00:00:00 2001 From: DingZQ Date: Tue, 15 Apr 2025 08:05:39 +0800 Subject: [PATCH] Refine --- main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index c4dd19a..ebe38c9 100644 --- a/main.py +++ b/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],