未验证 提交 a65cb481 编写于 作者: G gabry.wu 提交者: GitHub

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
上级 eef39767
...@@ -270,16 +270,9 @@ public class SqlTask extends AbstractTask { ...@@ -270,16 +270,9 @@ 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);
// if there is a result set sendAttachment(StringUtils.isNotEmpty(sqlParameters.getTitle()) ?
if (!resultJSONArray.isEmpty(null) ) { sqlParameters.getTitle(): taskExecutionContext.getTaskName() + " query result sets",
if (StringUtils.isNotEmpty(sqlParameters.getTitle())) { JSONUtils.toJsonString(resultJSONArray));
sendAttachment(sqlParameters.getTitle(),
JSONUtils.toJsonString(resultJSONArray));
}else{
sendAttachment(taskExecutionContext.getTaskName() + " query resultsets ",
JSONUtils.toJsonString(resultJSONArray));
}
}
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册