日常更新

from mac mini(m1)
This commit is contained in:
liubiren 2025-12-11 17:36:11 +08:00
parent 9df91dac94
commit 8be4c60d7e
2 changed files with 615 additions and 594 deletions

View File

@ -103,7 +103,9 @@ class CacheClient:
try: try:
# 创建缓存数据库连接 # 创建缓存数据库连接
self.connection = sqlite3.connect( self.connection = sqlite3.connect(
database=(Path(__file__).parent.resolve() / database), # 当前目录下创建缓存数据库 database=(
Path(__file__).parent.resolve() / database
), # 当前目录下创建缓存数据库
check_same_thread=False, check_same_thread=False,
timeout=30, # 缓存数据库锁超时时间单位默认为30秒避免并发锁死 timeout=30, # 缓存数据库锁超时时间单位默认为30秒避免并发锁死
) )
@ -310,6 +312,7 @@ class Arguments(BaseModel):
:param stream: 是否启用流式传输 :param stream: 是否启用流式传输
:param guid: 全局唯一标识 :param guid: 全局唯一标识
""" """
# 统一资源定位符 # 统一资源定位符
url: HttpUrl = Field(default=...) url: HttpUrl = Field(default=...)
# 查询参数 # 查询参数
@ -456,17 +459,13 @@ class HTTPClient:
# 重构表单数据 # 重构表单数据
if arguments.get("data") is not None: if arguments.get("data") is not None:
arguments["data"] = { arguments["data"] = {
k: v k: v for k, v in arguments["data"].items() if v is not None
for k, v in arguments["data"].items()
if v is not None
} }
# 重构JSON数据 # 重构JSON数据
if arguments.get("json_data") is not None: if arguments.get("json_data") is not None:
arguments["json_data"] = { arguments["json_data"] = {
k: v k: v for k, v in arguments["json_data"].items() if v is not None
for k, v in arguments["json_data"].items()
if v is not None
} }
# 重构文件数据 # 重构文件数据

File diff suppressed because it is too large Load Diff