Browse Source

[Bug][force-success] force success add end time (#15144)

Co-authored-by: Rick Cheng <rickchengx@gmail.com>
(cherry picked from commit e5a208f363abcb31bb7e8ffee16c7a142671c667)
小可耐 1 year ago
parent
commit
7d660ec2f9

+ 1 - 0
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskInstanceServiceImpl.java

@@ -255,6 +255,7 @@ public class TaskInstanceServiceImpl extends BaseServiceImpl implements TaskInst
 
         // change the state of the task instance
         task.setState(TaskExecutionStatus.FORCED_SUCCESS);
+        task.setEndTime(new Date());
         int changedNum = taskInstanceMapper.updateById(task);
         if (changedNum > 0) {
             processService.forceProcessInstanceSuccessByTaskInstanceId(taskInstanceId);