Skip to content

Commit 74ced63

Browse files
authored
fix: 优化无可用账号时的提示
1 parent 84960ba commit 74ced63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def choose_new_account():
179179
# logger.info(f"[choose_new_account] 新选择账号: {acc_id}")
180180
return account_queue.pop(i)
181181

182-
logger.warning("[choose_new_account] 没有可用的账号")
182+
logger.warning("[choose_new_account] 没有可用的账号或所有账号都在使用中")
183183
return None
184184

185185
def release_account(account):
@@ -207,7 +207,7 @@ def determine_mode_and_token(request: Request):
207207
request.state.tried_accounts = [] # 初始化已尝试账号
208208
selected_account = choose_new_account()
209209
if not selected_account:
210-
raise HTTPException(status_code=500, detail="No accounts configured.")
210+
raise HTTPException(status_code=500, detail="No accounts configured or all accounts are busy.")
211211
if not selected_account.get("token", "").strip():
212212
try:
213213
login_deepseek_via_account(selected_account)

0 commit comments

Comments
 (0)