无风险也更新
This commit is contained in:
@@ -40,6 +40,8 @@ async def do_analyze():
|
||||
analyze_result = await batch_risk_analyze(docs, risk_types)
|
||||
for task in analyze_result:
|
||||
if "是" not in task.response:
|
||||
if risks_to_update.get(task.doc.id) is None:
|
||||
risks_to_update[task.doc.id] = set()
|
||||
continue
|
||||
print(f"风险: {task.risk_type.name} 标题: {task.doc.title} {task.doc.id}")
|
||||
|
||||
@@ -58,7 +60,7 @@ async def do_analyze():
|
||||
""",
|
||||
{
|
||||
"es_id": doc_id,
|
||||
"risk_types": json.dumps(list(risks), ensure_ascii=False),
|
||||
"risk_types": json.dumps(list(risks), ensure_ascii=False) if risks else None,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user