// Decrement the expected number of creates because the informer won't observe this pod
// Decrement the expected number of creates because the informer won't observe this pod
glog.V(2).Infof("Failed creation, decrementing expectations for job %q/%q",job.Namespace,job.Name)
jm.expectations.CreationObserved(jobKey)
jm.expectations.CreationObserved(jobKey)
activeLock.Lock()
activeLock.Lock()
active--
active--
activeLock.Unlock()
activeLock.Unlock()
errCh<-err
}
}
}()
}()
}
}
wait.Wait()
wait.Wait()
}
}
returnactive
select{
caseerr:=<-errCh:
// all errors have been reported before, we only need to inform the controller that there was an error and it should re-try this job once more next time.