Browse Source

Merge pull request #522 from boandai/dev

update ProcessDao
remove dependency escheduler-api
pull/2/head
easyscheduler 5 years ago committed by GitHub
parent
commit
f9dc929a8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java
  2. 4
      escheduler-server/pom.xml
  3. 2
      escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

1
escheduler-dao/src/main/java/cn/escheduler/dao/ProcessDao.java

@ -1693,6 +1693,7 @@ public class ProcessDao extends AbstractBaseDao {
ProcessInstance processInstance = findProcessInstanceByTaskId(taskInstance.getId());
if(processInstance == null){
logger.error("cannot find the task:{} process instance", taskInstance.getId());
return Constants.DEFAULT_WORKER_ID;
}
int processWorkerGroupId = processInstance.getWorkerGroupId();

4
escheduler-server/pom.xml

@ -88,10 +88,6 @@
<groupId>cn.analysys</groupId>
<artifactId>escheduler-alert</artifactId>
</dependency>
<dependency>
<groupId>cn.analysys</groupId>
<artifactId>escheduler-api</artifactId>
</dependency>
</dependencies>

2
escheduler-server/src/main/java/cn/escheduler/server/worker/task/sql/SqlTask.java

@ -374,7 +374,7 @@ public class SqlTask extends AbstractTask {
String showTypeName = sqlParameters.getShowType().replace(Constants.COMMA,"").trim();
if(EnumUtils.isValidEnum(ShowType.class,showTypeName)){
Map<String, Object> mailResult = MailUtils.sendMails(receviersList, receviersCcList, title, content, ShowType.valueOf(showTypeName));
if(!(Boolean) mailResult.get(cn.escheduler.api.utils.Constants.STATUS)){
if(!(Boolean) mailResult.get(cn.escheduler.common.Constants.STATUS)){
throw new RuntimeException("send mail failed!");
}
}else{

Loading…
Cancel
Save