|
|
@@ -249,7 +249,7 @@ async def launch_review_sse(request_data: LaunchReviewRequest):
|
|
|
"project_plan_type": project_plan_type,
|
|
|
"status": "submitted",
|
|
|
"submitted_at": file_info['launched_at'],
|
|
|
- "message": "AI审查任务已成功启动",
|
|
|
+ "message": "施工方案审查任务启动成功,请耐心等待结果...",
|
|
|
"timestamp": datetime.now().isoformat()
|
|
|
}, ensure_ascii=False)
|
|
|
yield format_sse_event("submitted", success_data)
|
|
|
@@ -271,20 +271,20 @@ async def launch_review_sse(request_data: LaunchReviewRequest):
|
|
|
unit_review_json = json.dumps(current_data, ensure_ascii=False)
|
|
|
yield format_sse_event("unit_review", unit_review_json)
|
|
|
|
|
|
- # 统一检查任务完成状态
|
|
|
- if 'current_data' in locals() and current_data:
|
|
|
- overall_task_status = current_data.get("overall_task_status")
|
|
|
- if overall_task_status in ["completed", "failed"]:
|
|
|
- completion_data = {
|
|
|
- "callback_task_id": callback_task_id,
|
|
|
- "task_status": overall_task_status,
|
|
|
- "overall_progress": current_data.get("current", 100),
|
|
|
- "timestamp": datetime.now().isoformat(),
|
|
|
- "message": "审查任务处理完成!"
|
|
|
- }
|
|
|
- completion_json = json.dumps(completion_data, ensure_ascii=False)
|
|
|
- yield format_sse_event("completed", completion_json)
|
|
|
- break
|
|
|
+ # # 统一检查任务完成状态
|
|
|
+ # if 'current_data' in locals() and current_data:
|
|
|
+ # overall_task_status = current_data.get("overall_task_status")
|
|
|
+ # if overall_task_status in ["completed", "failed"]:
|
|
|
+ # completion_data = {
|
|
|
+ # "callback_task_id": callback_task_id,
|
|
|
+ # "task_status": overall_task_status,
|
|
|
+ # "overall_progress": current_data.get("current", 100),
|
|
|
+ # "timestamp": datetime.now().isoformat(),
|
|
|
+ # "message": "审查任务处理完成!"
|
|
|
+ # }
|
|
|
+ # completion_json = json.dumps(completion_data, ensure_ascii=False)
|
|
|
+ # yield format_sse_event("completed", completion_json)
|
|
|
+ # break
|
|
|
|
|
|
except Exception as e:
|
|
|
logger.error(f"队列消息处理异常: {callback_task_id}")
|