Skip to content

Commit f05c6a8

Browse files
KPostOfficeopenshift-merge-robot
authored andcommitted
renamed variable to avoid double negation
Signed-off-by: Kevin <[email protected]>
1 parent 59bab13 commit f05c6a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ func (qjm *XController) GetQueueJobsEligibleForPreemption() []*arbv1.AppWrapper
521521
awDispatchDurationLimit := value.Spec.SchedSpec.DispatchDuration.Limit
522522
dispatchDuration := value.Status.ControllerFirstDispatchTimestamp.Add(time.Duration(awDispatchDurationLimit) * time.Second)
523523
currentTime := time.Now()
524-
hasDispatchTimeNotExceeded := currentTime.Before(dispatchDuration)
524+
dispatchTimeExceeded := !currentTime.Before(dispatchDuration)
525525

526-
if !hasDispatchTimeNotExceeded {
526+
if dispatchTimeExceeded {
527527
klog.V(8).Infof("Appwrapper Dispatch limit exceeded, currentTime %v, dispatchTimeInSeconds %v", currentTime, dispatchDuration)
528528
value.Spec.SchedSpec.DispatchDuration.Overrun = true
529529
qjobs = append(qjobs, value)

0 commit comments

Comments
 (0)