Browse Source

bug修复

master
luogw 3 weeks ago
parent
commit
91db041ac2
  1. 9
      src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java

9
src/main/java/com/project/interaction/domain/service/impl/PostToGenerateQuestionDomainServiceImpl.java

@ -97,6 +97,8 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu
return; return;
} }
String message;
try { try {
// 应用限流:获取令牌,超过限流速率则等待 // 应用限流:获取令牌,超过限流速率则等待
long waitStart = System.currentTimeMillis(); long waitStart = System.currentTimeMillis();
@ -115,6 +117,8 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu
return; return;
} }
message = response != null ? response.getMessage() : "response is null";
}catch (Exception e) { }catch (Exception e) {
if (e instanceof WebClientResponseException exception) { if (e instanceof WebClientResponseException exception) {
int statusCode = exception.getStatusCode().value(); int statusCode = exception.getStatusCode().value();
@ -132,10 +136,11 @@ public class PostToGenerateQuestionDomainServiceImpl implements PostToGenerateQu
return; return;
} }
} }
message = e.getMessage();
} }
log.warn(">>> [题目生成] 调用算法服务失败, TaskId: {}", log.warn(">>> [题目生成] 调用算法服务失败, TaskId: {}, message: {}",
taskId); taskId,message);
//消息提醒 //消息提醒
notifyUtil.notify(taskId, clusterId); notifyUtil.notify(taskId, clusterId);

Loading…
Cancel
Save