Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
guowl3 committed Jul 12, 2024
1 parent e51cbc4 commit baba924
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ private void destroyExecutor(TaskFrameworkService taskFrameworkService, JobEntit
}
log.info("Job destroy executor succeed, jobId={}, status={}.", lockedEntity.getId(),
lockedEntity.getStatus());
} else if (lockedEntity.getStatus().isTerminated() && lockedEntity.getExecutorIdentifier() == null) {
// It is necessary to update the finish time when the job is terminated but the
// executorIdentifier is null, otherwise, the job cannot be released.
log.info("Executor not found, updating executor to destroyed,jobId={}", lockedEntity.getId());
taskFrameworkService.updateExecutorToDestroyed(lockedEntity.getId());
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ private void doRefreshResult(Long id) throws JobException {
taskResultPublisherExecutor.execute(() -> publisher
.publishEvent(new JobTerminateEvent(result.getJobIdentity(), result.getStatus())));

// TODO maybe we can destroy the pod there.
if (result.getStatus() == JobStatus.FAILED) {
AlarmUtils.alarm(AlarmEventNames.TASK_EXECUTION_FAILED,
MessageFormat.format("Job execution failed, jobId={0}",
Expand Down

0 comments on commit baba924

Please sign in to comment.