Raise Nginx proxy timeouts so AI daily/weekly review is not cut at 60s.
POST /ai_daily_review was returning 504 while the model was still running; patch BT reverse-proxy read/send timeouts to 360s on deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -336,7 +336,9 @@ function genDaily(){
|
||||
const ac = new AbortController();
|
||||
const timer = setTimeout(()=>ac.abort(), 360000);
|
||||
fetch("/ai_daily_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`date=${encodeURIComponent(d)}`,signal:ac.signal})
|
||||
.then(r=>{ if(!r.ok) throw new Error("HTTP "+r.status); return r.json(); })
|
||||
.then(r=>{ if(!r.ok) throw new Error(r.status === 504
|
||||
? "HTTP 504(网关超时:Nginx 等反代切断,通常 AI 仍在生成;已加长超时后请重试)"
|
||||
: ("HTTP "+r.status)); return r.json(); })
|
||||
.then(data=>{
|
||||
if(!data || data.result == null) throw new Error("返回数据为空");
|
||||
const el=document.getElementById("daily_result");
|
||||
@@ -379,7 +381,9 @@ function genWeekly(){
|
||||
const ac = new AbortController();
|
||||
const timer = setTimeout(()=>ac.abort(), 360000);
|
||||
fetch("/ai_weekly_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`start_date=${encodeURIComponent(s)}&end_date=${encodeURIComponent(e)}`,signal:ac.signal})
|
||||
.then(r=>{ if(!r.ok) throw new Error("HTTP "+r.status); return r.json(); })
|
||||
.then(r=>{ if(!r.ok) throw new Error(r.status === 504
|
||||
? "HTTP 504(网关超时:Nginx 等反代切断,通常 AI 仍在生成;已加长超时后请重试)"
|
||||
: ("HTTP "+r.status)); return r.json(); })
|
||||
.then(data=>{
|
||||
if(!data || data.result == null) throw new Error("返回数据为空");
|
||||
const el=document.getElementById("weekly_result");
|
||||
|
||||
Reference in New Issue
Block a user