diff --git a/web/backend/internal/handlers/run.go b/web/backend/internal/handlers/run.go index 78861ff..72c3685 100644 --- a/web/backend/internal/handlers/run.go +++ b/web/backend/internal/handlers/run.go @@ -43,7 +43,7 @@ func (d *Deps) RunPipeline(w http.ResponseWriter, r *http.Request) { } func (d *Deps) RunBatch(w http.ResponseWriter, r *http.Request) { - client := &http.Client{Timeout: 120 * time.Second} + client := &http.Client{Timeout: 180 * time.Second} resp, err := client.Post(d.TushareURL+"/api/v1/run/batch", "application/json", nil) if err != nil { writeErr(w, http.StatusBadGateway, fmt.Sprintf("tushare service unavailable: %v", err)) diff --git a/web/frontend/src/api/run.ts b/web/frontend/src/api/run.ts index 26774f2..23797e1 100644 --- a/web/frontend/src/api/run.ts +++ b/web/frontend/src/api/run.ts @@ -31,7 +31,7 @@ export function runPipeline(req: RunRequest) { } export function runBatch() { - return client.post('/run/batch').then((r) => r.data) + return client.post('/run/batch', null, { timeout: 180_000 }).then((r) => r.data) } export function getActiveContract(symbol: string) {