Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -839,11 +839,15 @@ public void cancel(CancelWarmUpJobCommand stmt) throws DdlException {
}

public void cancel(long jobId) throws DdlException {
cancel(jobId, "user cancel");
}

public void cancel(long jobId, String msg) throws DdlException {
CloudWarmUpJob job = cloudWarmUpJobs.get(jobId);
if (job == null) {
throw new DdlException("job id: " + jobId + " does not exist.");
}
if (!job.cancel("user cancel", true)) {
if (!job.cancel(msg, true)) {
throw new DdlException("job can not be cancelled. State: " + job.getJobState());
}
}
Expand Down
Loading