Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/controller/batch/taskqueue_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func (r *TaskQueueReconciler) syncTaskQueueStatus(ctx context.Context, tq *queue
}
}
}
if r.getInProgressTaskCount(tq) < tq.Spec.MaxConcurrentTasks { // In case of fewer tasks than max concurrent, we should processPendingTasks
shouldRequeue = false
}
return shouldRequeue, utilerrors.NewAggregate(errs)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/batch/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (r *TaskQueueReconciler) handleResourcesUpdate(ctx context.Context, obj int
return nil
}
if _, err := r.syncTaskQueueStatus(ctx, tq, func(key string) bool {
return key == newObj.GetName()
return key == fmt.Sprintf("%s/%s", newObj.GetNamespace(), newObj.GetName())
}); err != nil {
return fmt.Errorf("failed to sync task status: %w", err)
}
Expand Down
Loading