输出风险分析
This commit is contained in:
@@ -118,6 +118,8 @@ async def batch_risk_analyze(
|
|||||||
task.response = await risk_analyze(task, model)
|
task.response = await risk_analyze(task, model)
|
||||||
queue.task_done()
|
queue.task_done()
|
||||||
bar.update(1)
|
bar.update(1)
|
||||||
|
if bar.n % 100 == 0:
|
||||||
|
print(f"已完成 {bar.n} 条风险分析")
|
||||||
|
|
||||||
async def producer():
|
async def producer():
|
||||||
for task in tasks:
|
for task in tasks:
|
||||||
@@ -131,6 +133,8 @@ async def batch_risk_analyze(
|
|||||||
await queue.put(None)
|
await queue.put(None)
|
||||||
await asyncio.gather(*workers)
|
await asyncio.gather(*workers)
|
||||||
|
|
||||||
|
print("风险分析完成")
|
||||||
|
|
||||||
return tasks
|
return tasks
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user