Skip to content

Commit

Permalink
refactor: Optimized code
Browse files Browse the repository at this point in the history
The two judgments can be merged

Fixes volcano-sh#4065
  • Loading branch information
feyounger committed Mar 7, 2025
1 parent 5f72a83 commit 1424ff8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/controllers/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,7 @@ func (jc *jobCache) TaskCompleted(jobKey, taskName string) bool {

taskPods, found := jobInfo.Pods[taskName]

if !found {
return false
}

if jobInfo.Job == nil {
if !found || jobInfo.Job == nil {
return false
}

Expand Down

0 comments on commit 1424ff8

Please sign in to comment.