review(onmyoji_gacha): fix 2x timeout + Pydantic v2 model_validator + review report
This commit is contained in:
@@ -51,7 +51,7 @@ async def query_qq_binding(qq: str) -> Tuple[bool, Optional[str], Optional[str]]
|
||||
url = f"{DD_API_HOST}query_qq_binding"
|
||||
data = {"qq": qq}
|
||||
|
||||
response = await asyncio.to_thread(requests.post, url=url, json=data)
|
||||
response = await asyncio.to_thread(requests.post, url=url, json=data, timeout=10)
|
||||
logger.debug(f"查询QQ绑定状态响应: {response}")
|
||||
|
||||
if response.status_code != 200:
|
||||
@@ -106,7 +106,7 @@ async def add_user_viptime(username: str, time_class: str = "Day", count: int =
|
||||
"classes": time_class
|
||||
}
|
||||
|
||||
response = await asyncio.to_thread(requests.post, url=url, json=data)
|
||||
response = await asyncio.to_thread(requests.post, url=url, json=data, timeout=10)
|
||||
logger.debug(f"添加VIP时间响应({i+1}/{count}): {response}")
|
||||
|
||||
if response.status_code != 200:
|
||||
|
||||
Reference in New Issue
Block a user