mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-01 03:37:46 +08:00
[Fix-4738][Mail] Fix send mail failed instead of execute sql error (#4739)
This commit is contained in:
parent
c9972936d6
commit
0c26e10f3f
@ -298,8 +298,12 @@ public class SqlTask extends AbstractTask {
|
|||||||
String result = JSONUtils.toJsonString(resultJSONArray);
|
String result = JSONUtils.toJsonString(resultJSONArray);
|
||||||
logger.debug("execute sql : {}", result);
|
logger.debug("execute sql : {}", result);
|
||||||
|
|
||||||
|
try {
|
||||||
sendAttachment(sqlParameters.getGroupId(), StringUtils.isNotEmpty(sqlParameters.getTitle()) ? sqlParameters.getTitle() : taskExecutionContext.getTaskName() + " query result sets",
|
sendAttachment(sqlParameters.getGroupId(), StringUtils.isNotEmpty(sqlParameters.getTitle()) ? sqlParameters.getTitle() : taskExecutionContext.getTaskName() + " query result sets",
|
||||||
JSONUtils.toJsonString(resultJSONArray));
|
JSONUtils.toJsonString(resultJSONArray));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.warn("sql task sendAttachment error! msg : {} ", e.getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user