批量打分接口超时时间从15s增加到180s,避免6品种同步时超时
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user