fix: wong update status in some situations

This commit is contained in:
2025-03-05 11:40:22 +03:30
parent 346f69100c
commit 556d9ff6af
3 changed files with 10 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ func (job *ManagedJob) Cycle() {
// pkg.Logger.Debug("[managed-job] [new] check cycle", zap.String("jobName", job.def.GetName()))
// Init job
if job.def.Status.LifeCycleStatus == "" && job.def.Status.JobStatus == "" {
if job.def.Status.LifeCycleStatus == "" && (job.def.Status.JobStatus == "" || job.def.Status.JobStatus == v1alpha1.JobStatusFinished) {
job.Run(false)
return
}