fix: 修复速率限制错误仍会重试的问题
问题: - 遇到速率限制时抛出 RateLimitError 异常 - 但被外层的 except Exception 捕获,继续重试 - 导致持续触发速率限制,无法停止 修复: - 在异常处理中优先检查 RateLimitError - 如果是速率限制错误,直接重新抛出,不进行重试 - 让 route_watcher 正确捕获并记录到限制列表 效果: - 遇到速率限制时立即停止重试 - 正确记录到 rate_limited_domains - 后续检查自动跳过,直到限制解除
This commit is contained in:
parent
f34c2e28d1
commit
9d3a4f0f71
@ -424,6 +424,9 @@ class APISIXSSLManager:
|
||||
|
||||
return False
|
||||
|
||||
except RateLimitError:
|
||||
# 速率限制错误不应该重试,直接抛出
|
||||
raise
|
||||
except subprocess.TimeoutExpired:
|
||||
if attempt < max_retries:
|
||||
logger.warning(f"证书申请超时 (尝试 {attempt}/{max_retries}),将重试...")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user