Skip to content

Commit 0aa05f3

Browse files
asm582openshift-merge-robot
authored andcommitted
fix break condition
1 parent f010f69 commit 0aa05f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: pkg/controller/queuejob/queuejob_controller_ex.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ func (cc *XController) updateQueueJob(oldObj, newObj interface{}) {
17041704
for {
17051705
time.Sleep(requeueInterval)
17061706
latestAw, exists, err := cc.appwrapperInformer.Informer().GetStore().GetByKey(key)
1707-
if latestAw.(*arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateCompleted || latestAw.(arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateFailed || latestAw.(arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateDeleted || !exists {
1707+
if latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateActive && latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateEnqueued && latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateRunningHoldCompletion || !exists {
17081708
klog.V(2).Infof("[Informer-updateQJ] Stopping requeue for AW %s with status %s", latestAw.(*arbv1.AppWrapper).Name, latestAw.(*arbv1.AppWrapper).Status.State)
17091709
break //Exit the loop
17101710
}

0 commit comments

Comments
 (0)