BUGFIX:邮件发送失败
This commit is contained in:
@@ -1024,7 +1024,7 @@ public class SendEmailUtil {
|
|||||||
log.info("邮件发送结果res###{}", SendEmailResponse.toJsonString(resp));
|
log.info("邮件发送结果res###{}", SendEmailResponse.toJsonString(resp));
|
||||||
} catch (TencentCloudSDKException e) {
|
} catch (TencentCloudSDKException e) {
|
||||||
log.info("邮件发送失败###{}", e.toString());
|
log.info("邮件发送失败###{}", e.toString());
|
||||||
throw new BusinessException("failed.to.send.mail");
|
// throw new BusinessException("failed.to.send.mail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ public class SendRequestUtil {
|
|||||||
|
|
||||||
public String sendFluxPost(String url, String requestBodyStr) {
|
public String sendFluxPost(String url, String requestBodyStr) {
|
||||||
// 尝试两个API key
|
// 尝试两个API key
|
||||||
String[] apiKeys = {"d447a0ac-2291-4f1c-9a36-f7614c385989",
|
String[] apiKeys = {"84e8f5d5-b0b3-49aa-b244-ab7ba27e7ae7",
|
||||||
"84e8f5d5-b0b3-49aa-b244-ab7ba27e7ae7"};
|
"d447a0ac-2291-4f1c-9a36-f7614c385989"};
|
||||||
boolean[] notified = {false, false}; // 记录是否已发送过不足提醒
|
boolean[] notified = {false, false}; // 记录是否已发送过不足提醒
|
||||||
|
|
||||||
for (int i = 0; i < apiKeys.length; i++) {
|
for (int i = 0; i < apiKeys.length; i++) {
|
||||||
@@ -140,8 +140,8 @@ public class SendRequestUtil {
|
|||||||
if (status == 402 || status == 403) {
|
if (status == 402 || status == 403) {
|
||||||
if (!notified[i]) {
|
if (!notified[i]) {
|
||||||
SendEmailUtil.commonExceptionReminder(
|
SendEmailUtil.commonExceptionReminder(
|
||||||
"Flux账户积分不足,flux生成任务失败",
|
"Flux账户积分不足,flux生成任务失败。(key:)" + apiKeys[i],
|
||||||
new String[]{"xupei3360@163.com, fangjianliao@aidlab.hk, investigation@aidlab.hk"}
|
new String[]{"xupei3360@163.com", "fangjianliao@aidlab.hk", "investigation@aidlab.hk"}
|
||||||
);
|
);
|
||||||
notified[i] = true;
|
notified[i] = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user