Skip to content

Commit 46ef091

Browse files
committed
fix break condition
1 parent 39315a5 commit 46ef091

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

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

0 commit comments

Comments
 (0)