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:
parent
370e55fd48
commit
dd7b1b1d0c
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ public class PropertyUtils {
|
|||
return Boolean.parseBoolean(value);
|
||||
}
|
||||
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue