tmp: kb_diag4修正SQL参数

This commit is contained in:
ymq 2026-09-04 19:52:54 +08:00
parent 97d1f7aec4
commit a1ddf7a9ca

View File

@ -25,14 +25,14 @@ try:
async with DBPools().sqlorContext(dbname) as sor:
recs = await sor.sqlExe(
"SELECT id, kb_id, file_name, status FROM pipeline_kb_suggestions "
"ORDER BY created_at DESC LIMIT 1")
"ORDER BY created_at DESC LIMIT 1", {})
await sor.sqlExe("COMMIT", {})
if recs:
out["suggestion"] = {"id": recs[0].id, "kb_id": recs[0].kb_id,
"file_name": recs[0].file_name, "status": recs[0].status}
ht = await sor.sqlExe(
"SELECT id, task_type, assignee_id, status, form_schema FROM pipeline_human_tasks "
"WHERE task_type='kb_ingest_confirm' ORDER BY created_at DESC LIMIT 1")
"WHERE task_type='kb_ingest_confirm' ORDER BY created_at DESC LIMIT 1", {})
await sor.sqlExe("COMMIT", {})
if ht:
out["human_task"] = {"id": ht[0].id, "task_type": ht[0].task_type,