Skip to content

Commit

Permalink
Merge pull request #632 from YesterdayxD/master
Browse files Browse the repository at this point in the history
remove redundant type conversion
  • Loading branch information
volcano-sh-bot authored Dec 20, 2019
2 parents 8d82937 + 8926875 commit cf5d99a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/job/job_controller_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (cc *Controller) killJob(jobInfo *apis.JobInfo, podRetainPhase state.PhaseM
Terminating: terminating,
Unknown: unknown,
Version: job.Status.Version,
MinAvailable: int32(job.Spec.MinAvailable),
MinAvailable: job.Spec.MinAvailable,
RetryCount: job.Status.RetryCount,
}

Expand Down Expand Up @@ -308,7 +308,7 @@ func (cc *Controller) syncJob(jobInfo *apis.JobInfo, updateStatus state.UpdateSt
Terminating: terminating,
Unknown: unknown,
Version: job.Status.Version,
MinAvailable: int32(job.Spec.MinAvailable),
MinAvailable: job.Spec.MinAvailable,
ControlledResources: job.Status.ControlledResources,
RetryCount: job.Status.RetryCount,
}
Expand Down Expand Up @@ -509,7 +509,7 @@ func (cc *Controller) initJobStatus(job *batch.Job) (*batch.Job, error) {
}

job.Status.State.Phase = batch.Pending
job.Status.MinAvailable = int32(job.Spec.MinAvailable)
job.Status.MinAvailable = job.Spec.MinAvailable
newJob, err := cc.vcClient.BatchV1alpha1().Jobs(job.Namespace).UpdateStatus(job)
if err != nil {
klog.Errorf("Failed to update status of Job %v/%v: %v",
Expand Down

0 comments on commit cf5d99a

Please sign in to comment.