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

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

* fix NPE
This commit is contained in:
Tboy 2019-10-13 12:06:59 +08:00 committed by dailidong
parent 370e55fd48
commit dd7b1b1d0c
3 changed files with 5 additions and 4 deletions

View File

@ -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();

View File

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

View File

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