fix: search_documents 端点添加异常处理防止 traceback 泄露
This commit is contained in:
@@ -63,18 +63,6 @@ for label, d in targets:
|
||||
skipped.append((f.name, size))
|
||||
continue
|
||||
files.append((label, str(f)))
|
||||
# 顶层 .md 文件
|
||||
for target_info in targets:
|
||||
d = target_info[1]
|
||||
p = Path(d)
|
||||
if not p.exists():
|
||||
continue
|
||||
for f in p.glob("*.md"):
|
||||
sz = f.stat().st_size
|
||||
if sz > MAX_SIZE:
|
||||
skipped.append((f.name, sz))
|
||||
else:
|
||||
files.append(("顶层/" + p.name, str(f)))
|
||||
|
||||
log(f"待处理: {len(files)} 个文件")
|
||||
if skipped:
|
||||
|
||||
Reference in New Issue
Block a user