Skip to content

Commit 9e1687e

Browse files
authored
Merge branch 'master' into master
2 parents 9480192 + f993e0f commit 9e1687e

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pkg/controllers/cache/cache.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,7 @@ func (jc *jobCache) TaskCompleted(jobKey, taskName string) bool {
273273

274274
taskPods, found := jobInfo.Pods[taskName]
275275

276-
if !found {
277-
return false
278-
}
279-
280-
if jobInfo.Job == nil {
276+
if !found || jobInfo.Job == nil {
281277
return false
282278
}
283279

pkg/controllers/job/job_controller_resync.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ func (cc *jobcontroller) processResyncTask() {
4343
return
4444
}
4545

46+
defer cc.errTasks.Done(obj)
47+
4648
// one task only resync 10 times
4749
if cc.errTasks.NumRequeues(obj) > 10 {
4850
cc.errTasks.Forget(obj)
4951
return
5052
}
5153

52-
defer cc.errTasks.Done(obj)
53-
5454
task, ok := obj.(*v1.Pod)
5555
if !ok {
5656
klog.Errorf("failed to convert %v to *v1.Pod", obj)

0 commit comments

Comments
 (0)