fix: resolve job start after pause bug

This commit is contained in:
Mohamad Khani 2025-01-17 21:16:38 +03:30
parent 896d45e15a
commit 4bbb027c41

View File

@ -18,11 +18,6 @@ func (job *ManagedJob) Cycle() {
return
}
if job.def.Status.JobStatus == v1alpha1.JobStatusFinished && job.def.Status.LifeCycleStatus == v1alpha1.LifeCycleStatusGracefullyPaused {
job.Run(true)
return
}
if job.def.Status.JobStatus == v1alpha1.JobStatusRunning {
if (job.def.Spec.SavepointInterval.Duration != 0) && ((job.def.Status.LastSavepointDate == nil) || time.Now().Add(-job.def.Spec.SavepointInterval.Duration).After(*job.def.Status.LastSavepointDate)) {
if job.def.Status.SavepointTriggerId == nil {