Repository navigation
Conversation
_get_control_plane_timeout() 把控制面请求(ST→AT、项目创建/查询、媒体信息等) 的超时上限固定在 10 秒,对经代理访问 Flow 的链路偏紧,网络抖动时容易在 生成前置阶段直接失败。 放宽到 30 秒,仍受 config.flow_timeout 与下限 5 秒约束,不会无限等待。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
_get_control_plane_timeout()用于控制面轻量请求,当前实现把超时上限固定在 10 秒:覆盖的调用包括:
st_to_at()(ST → AT 认证)create_project()/ 项目列表与详情查询media.getMediaUrlRedirect等)_get_control_plane_timeout()直接作为默认值的若干 Flow 前端 RPC在经代理访问 Flow 的环境中,这些请求偶发超过 10 秒(TLS 握手 + 代理转发 + Flow 控制面排队),会直接把生成前置步骤判为失败;而实际请求往往在 10~20 秒内就能返回。
改动
config.flow_timeout封顶,并保留下限 5 秒,不会无限等待;_get_video_submit_timeout()等生成链路的独立超时策略。权衡
验证
import src.services.flow_client正常;说明
与 #195(reCAPTCHA 取码修复)相互独立,可单独合并。