Skip to content

Commit

Permalink
refactor: codereview feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Lüders committed Feb 15, 2024
1 parent 0834d8f commit 5526179
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/periodic/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ func (j *JobController) WaitForJobCompletion(ctx context.Context, jobName string
continue
}

job, fail := event.Object.(*batchv1.Job)
if job == nil || fail {
job, ok := event.Object.(*batchv1.Job)
if !ok {
return fmt.Errorf("failed to cast job event: %v", event.Object)
}
if job.Status.Succeeded > 0 {
Expand Down

0 comments on commit 5526179

Please sign in to comment.