|
|
|
@ -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); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|