mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-03 20:58:11 +08:00
always send emails no matter there are results (#3015)
* always send emails no matter there are results * always send emails no matter there are results
This commit is contained in:
parent
eef397675b
commit
a65cb48191
@ -270,16 +270,9 @@ public class SqlTask extends AbstractTask {
|
||||
String result = JSONUtils.toJsonString(resultJSONArray);
|
||||
logger.debug("execute sql : {}", result);
|
||||
|
||||
// if there is a result set
|
||||
if (!resultJSONArray.isEmpty(null) ) {
|
||||
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) {
|
||||
sendAttachment(sqlParameters.getTitle(),
|
||||
JSONUtils.toJsonString(resultJSONArray));
|
||||
}else{
|
||||
sendAttachment(taskExecutionContext.getTaskName() + " query resultsets ",
|
||||
JSONUtils.toJsonString(resultJSONArray));
|
||||
}
|
||||
}
|
||||
sendAttachment(StringUtils.isNotEmpty(sqlParameters.getTitle()) ?
|
||||
sqlParameters.getTitle(): taskExecutionContext.getTaskName() + " query result sets",
|
||||
JSONUtils.toJsonString(resultJSONArray));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user