debug(M7.2c): judge fetch 加防御日志定位 PENDING 期间 500
这个提交包含在:
@@ -64,6 +64,15 @@ async def fetch(rid: str, uid: str = "guest", session: Session = Depends(get_ses
|
|||||||
data = await svc.fetch(rid)
|
data = await svc.fetch(rid)
|
||||||
except JudgeEngineError as e:
|
except JudgeEngineError as e:
|
||||||
raise HTTPException(404, str(e))
|
raise HTTPException(404, str(e))
|
||||||
|
except Exception as e:
|
||||||
|
import logging, traceback
|
||||||
|
logging.getLogger("fluent.judge").exception("judge fetch 未预期异常")
|
||||||
|
try:
|
||||||
|
with open("/tmp/fl_judge_err.log", "a") as f:
|
||||||
|
f.write(f"[{rid}] {type(e).__name__}: {e}\n{traceback.format_exc()}\n---\n")
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
raise HTTPException(500, f"judge fetch 内部错误: {type(e).__name__}: {e}")
|
||||||
# 判题结果回写消息 meta
|
# 判题结果回写消息 meta
|
||||||
msg = MessageRepo(session).find_by_meta("rid", rid)
|
msg = MessageRepo(session).find_by_meta("rid", rid)
|
||||||
if msg:
|
if msg:
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户