Skip to content

Commit

Permalink
fix break condition
Browse files Browse the repository at this point in the history
  • Loading branch information
asm582 committed Sep 7, 2023
1 parent 39315a5 commit 46ef091
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ func (cc *XController) updateQueueJob(oldObj, newObj interface{}) {
for {
time.Sleep(requeueInterval)
latestAw, exists, err := cc.appwrapperInformer.Informer().GetStore().GetByKey(key)
if latestAw.(*arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateCompleted || latestAw.(arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateFailed || latestAw.(arbv1.AppWrapper).Status.State == arbv1.AppWrapperStateDeleted || !exists {
if latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateActive && latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateEnqueued && latestAw.(*arbv1.AppWrapper).Status.State != arbv1.AppWrapperStateRunningHoldCompletion || !exists {
klog.V(2).Infof("[Informer-updateQJ] Stopping requeue for AW %s with status %s", latestAw.(*arbv1.AppWrapper).Name, latestAw.(*arbv1.AppWrapper).Status.State)
break //Exit the loop
}
Expand Down

0 comments on commit 46ef091

Please sign in to comment.