Fix/skip terminal ns (#5675)

* fix skip namespace terminating status

* processUsersInParallel semaphore to 1000
This commit is contained in:
Jiahui
2025-07-03 11:42:14 +08:00
committed by GitHub
parent 3896063bb2
commit 19e63bd413
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -540,7 +540,7 @@ func (r *DebtReconciler) retryFailedUsers() {
func (r *DebtReconciler) processUsersInParallel(users []uuid.UUID) {
var (
wg sync.WaitGroup
semaphore = make(chan struct{}, 50)
semaphore = make(chan struct{}, 1000)
)
for _, user := range users {
+3
View File
@@ -260,6 +260,9 @@ func getOwnNsListWithClt(clt client.Client, user string) ([]string, error) {
}
nsListStr := make([]string, len(nsList.Items))
for i := range nsList.Items {
if nsList.Items[i].Status.Phase == corev1.NamespaceTerminating {
continue
}
nsListStr[i] = nsList.Items[i].Name
}
return nsListStr, nil