mirror of
https://github.com/labring/sealos.git
synced 2026-09-21 05:44:43 +08:00
Fix/skip terminal ns (#5675)
* fix skip namespace terminating status * processUsersInParallel semaphore to 1000
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user