Unverified Commit fc646434 authored by aiwenmo's avatar aiwenmo Committed by GitHub

[Fix-427] [admin] Task status error when task has stoped

[Fix-427] [admin] Task status error when task has stoped
parents 429a25da 7a6749bf
......@@ -223,11 +223,11 @@ public class TaskServiceImpl extends SuperServiceImpl<TaskMapper, Task> implemen
if (statement != null) {
task.setStatement(statement.getStatement());
}
if (Asserts.isNull(task.getJobInstanceId()) || task.getJobInstanceId() == 0) {
JobInstance jobInstance = jobInstanceService.getJobInstanceByTaskId(id);
if (Asserts.isNotNull(jobInstance) && !JobStatus.isDone(jobInstance.getStatus())) {
task.setJobInstanceId(jobInstance.getId());
}
JobInstance jobInstance = jobInstanceService.getJobInstanceByTaskId(id);
if (Asserts.isNotNull(jobInstance) && !JobStatus.isDone(jobInstance.getStatus())) {
task.setJobInstanceId(jobInstance.getId());
}else {
task.setJobInstanceId(0);
}
}
return task;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment