tweak(video): 视频渲染预算拉到 30 分钟
This commit is contained in:
@@ -55,7 +55,7 @@ func sanitizeErr(err error) string {
|
||||
return "upstream request failed"
|
||||
}
|
||||
|
||||
func httpClient() *http.Client { return &http.Client{Timeout: 20 * time.Minute} }
|
||||
func httpClient() *http.Client { return &http.Client{Timeout: 30 * time.Minute} }
|
||||
|
||||
// GenerateImage calls the upstream OpenAI image API. With reference images it
|
||||
// uses /v1/images/edits (multipart); otherwise /v1/images/generations. Returns
|
||||
|
||||
@@ -46,7 +46,7 @@ const (
|
||||
consoleMaxEditImages = 3
|
||||
|
||||
consoleVideoPollEvery = 2 * time.Second
|
||||
consoleVideoDeadline = 20 * time.Minute
|
||||
consoleVideoDeadline = 30 * time.Minute
|
||||
)
|
||||
|
||||
// consoleSession is one minted DPoP token plus the key it is bound to. skew is
|
||||
|
||||
@@ -291,7 +291,7 @@ func (c *Client) createPost(ctx context.Context, client tlsclient.HttpClient, to
|
||||
// assets.grok.com is not anti-bot gated) until grok finishes rendering it.
|
||||
// 404 means "still rendering"; auth failures abort.
|
||||
func (c *Client) waitForAsset(ctx context.Context, client tlsclient.HttpClient, token, url string) error {
|
||||
deadline := time.Now().Add(20 * time.Minute)
|
||||
deadline := time.Now().Add(30 * time.Minute)
|
||||
for {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
|
||||
@@ -1506,8 +1506,8 @@ func (s *V1Service) finishUnimplementedEvent(ctx context.Context, eventID string
|
||||
}
|
||||
|
||||
// videoGenBudget caps one video render end-to-end (submit + poll + download).
|
||||
// 上游慢的时候(seedance 长镜头)12 分钟不够,统一给 20 分钟。
|
||||
const videoGenBudget = 20 * time.Minute
|
||||
// 上游慢的时候(seedance 长镜头)12 分钟不够,统一给 30 分钟。
|
||||
const videoGenBudget = 30 * time.Minute
|
||||
|
||||
// grokConcurrencyPerAccount is how many simultaneous generations one grok account
|
||||
// may run (grok tolerates 10, unlike the 1-per-account default elsewhere).
|
||||
|
||||
Reference in New Issue
Block a user