diff --git a/pkg/controller.v1/common/job.go b/pkg/controller.v1/common/job.go index 35a3e4e2f2..589bd82f03 100644 --- a/pkg/controller.v1/common/job.go +++ b/pkg/controller.v1/common/job.go @@ -150,7 +150,7 @@ func (jc *JobController) ReconcileJobs( jobStatus.ReplicaStatuses[rType].Active = 0 } jobStatus.StartTime = nil - msg := fmt.Sprintf("%s %s is suspended.", jc.Controller.GetAPIGroupVersionKind().Kind, jobName) + msg := fmt.Sprintf("%s %s is suspended.", jobKind, jobName) if commonutil.IsRunning(jobStatus) { if err = commonutil.UpdateJobConditions(&jobStatus, apiv1.JobRunning, corev1.ConditionFalse, commonutil.NewReason(jobKind, commonutil.JobSuspendedReason), msg); err != nil { @@ -167,8 +167,8 @@ func (jc *JobController) ReconcileJobs( } return nil } - if !trainutil.IsJobSuspended(runPolicy) && commonutil.IsSuspend(jobStatus) { - msg := fmt.Sprintf("%s %s is resumed.", jc.Controller.GetAPIGroupVersionKind().Kind, jobName) + if commonutil.IsSuspend(jobStatus) { + msg := fmt.Sprintf("%s %s is resumed.", jobKind, jobName) if err = commonutil.UpdateJobConditions(&jobStatus, apiv1.JobSuspended, corev1.ConditionFalse, commonutil.NewReason(jobKind, commonutil.JobResumedReason), msg); err != nil { return err