fix: wrong life-cycle-status after job failed

This commit is contained in:
Mohamad Khani 2024-12-18 11:12:08 +03:30
parent 5bc047dbd1
commit 7e33fd6cef

View File

@ -41,6 +41,12 @@ func (job *ManagedJob) Cycle() {
if job.def.Status.JobStatus == v1alpha1.JobStatusCreating {
return
}
if job.def.Status.JobStatus == v1alpha1.JobStatusFailed {
job.def.Status.LifeCycleStatus = v1alpha1.LifeCycleStatusFailed
job.crd.SetJobStatus(job.def.UID, job.def.Status)
return
}
// if job.def.Status.JobStatus == v1alpha1.JobStatusFailed && job.def.Status.LastSavepointPath != nil {
// //job.restore()
// return