From 6bfd6141148fb42afda3900940f787df6a4b656d Mon Sep 17 00:00:00 2001 From: luogw <3132758203@qq.com> Date: Wed, 18 Mar 2026 11:34:10 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...PostToGenerateQuestionDomainServiceImpl.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java b/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java index 96ed191..94a2264 100644 --- a/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java +++ b/src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java @@ -81,16 +81,15 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu if (waitTime > 100) { log.info(">>> [题目生成] 因限流等待了 {} ms, TaskId: {}", waitTime, taskId); } - generateFallbackQuestions(dtoList, questionType, num); //尝试调用算法服务生成题目 -// GenerateQuestionResponseDTO response = callAlgorithmService(dtoList, questionType, num, knowledgePoint.getParseName()); -// -// if (response != null && StringUtils.isNotBlank(response.getMessage()) && response.getMessage().contains("success")) { -// log.info(">>> [题目生成] 算法服务接受任务成功, 任务: {}, 状态: {}, 信息:{}", -// response.getTaskId(), response.getStatus(),response.getMessage()); -// return; -// } + GenerateQuestionResponseDTO response = callAlgorithmService(dtoList, questionType, num, knowledgePoint.getParseName()); + + if (response != null && StringUtils.isNotBlank(response.getMessage()) && response.getMessage().contains("success")) { + log.info(">>> [题目生成] 算法服务接受任务成功, 任务: {}, 状态: {}, 信息:{}", + response.getTaskId(), response.getStatus(),response.getMessage()); + return; + } } catch (Exception e) { log.warn(">>> [题目生成] 调用算法服务失败,启动熔断降级方案, TaskId: {}, 错误: {}", @@ -101,7 +100,7 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu // log.info(">>> [题目生成] 启用熔断降级,生成默认题目"); // generateFallbackQuestions(dtoList, questionType, num); //发送预警通知 -// notifyUtil.notify(taskId,clusterId); + notifyUtil.notify(taskId,clusterId); } /**