[fix](mtmv) Fix cancelled tasks with running status (#39424) (#39489)

pick from master #39424
This commit is contained in:
zhangdong
2024-08-16 19:54:16 +08:00
committed by GitHub
parent 2948b5ea2b
commit c9a246b65b

View File

@ -137,8 +137,8 @@ public abstract class AbstractTask implements Task {
@Override
public void cancel() throws JobException {
try {
executeCancelLogic();
status = TaskStatus.CANCELED;
executeCancelLogic();
} catch (Exception e) {
log.warn("cancel task failed, job id is {}, task id is {}", jobId, taskId, e);
throw new JobException(e);