Browse Source

move updateTaskState into try/catch block in case of exception (#1003)

* move updateTaskState into try/catch block in case of exception

* fix NPE
pull/2/head
Tboy 5 years ago committed by dailidong
parent
commit
dd7b1b1d0c
  1. 1
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java
  2. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java
  3. 2
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskScheduleThread.java

1
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/SchedulerService.java

@ -450,6 +450,7 @@ public class SchedulerService extends BaseService {
Schedule schedule = processDao.querySchedule(scheduleId);
if (schedule == null) {
logger.warn("process schedule info not exists");
return;
}
Date startDate = schedule.getStartTime();

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java

@ -129,7 +129,7 @@ public class PropertyUtils {
return Boolean.parseBoolean(value);
}
return null;
return false;
}
/**

2
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/runner/TaskScheduleThread.java

@ -82,10 +82,10 @@ public class TaskScheduleThread implements Runnable {
@Override
public void run() {
try {
// update task state is running according to task type
updateTaskState(taskInstance.getTaskType());
try {
logger.info("script path : {}", taskInstance.getExecutePath());
// task node
TaskNode taskNode = JSONObject.parseObject(taskInstance.getTaskJson(), TaskNode.class);

Loading…
Cancel
Save