OCR 500: GPU 回退 CPU、返回详细错误、增加 test-ocr 诊断。
This commit is contained in:
@@ -177,7 +177,8 @@ def _process_wrong_question(question_id: uuid.UUID):
|
||||
if "libGL" in str(exc):
|
||||
msg += " 请在服务器执行: sudo bash deploy/install-ocr-deps.sh && systemctl restart grade-archive"
|
||||
elif ocr_url:
|
||||
msg += f" 请检查 OCR 服务是否可达: {ocr_url} (可浏览器访问 {ocr_url.rstrip('/')}/health)"
|
||||
if "OCR 服务" not in msg:
|
||||
msg += " 诊断: bash deploy/ocr-screen.sh status && bash deploy/ocr-worker/test-ocr.sh"
|
||||
wq.error_message = msg
|
||||
db.commit()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user