fix(node-agent): resilient output upload — 60s HTTP timeout + 4× retry on upload-URL

After a CPU-heavy AE render+transcode the orchestrator/DB can be briefly slow;
the 15s client timeout made the post-render output-upload-url call fail and the
finished MP4 was dropped (completed without export). Bumped client timeout to 60s
and retry the upload-URL call up to 4× with backoff so a finished render's output
is never lost to a transient stall.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-06 18:57:09 +03:30
parent e59f07df4e
commit 62807f5f41
2 changed files with 19 additions and 3 deletions
@@ -26,7 +26,9 @@ func New(baseURL, nodeHMACSecret string) *Client {
return &Client{
base: strings.TrimRight(baseURL, "/"),
secret: nodeHMACSecret,
http: &http.Client{Timeout: 15 * time.Second},
// 60s: the post-render output-upload-url call (export insert + presign) can be
// slow when the DB is briefly busy right after a CPU-heavy render/transcode.
http: &http.Client{Timeout: 60 * time.Second},
}
}