fix removal condition
All checks were successful
Pipeline was successful

This commit is contained in:
Tobias Trabelsi 2023-11-08 21:32:22 +01:00
parent f9cebaf216
commit 2e787818d1
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E

View File

@ -86,7 +86,7 @@ func main() {
"Caller": "Main",
}).Fatal(fmt.Sprintf("Error checking woodpecker queue: %s", err.Error()))
}
if runningTasks <= len(ownedNodes) && runningTasks != 0 && pendingTasks > 0 {
if (runningTasks <= len(ownedNodes) && runningTasks != 0) || pendingTasks > 0 {
log.WithFields(log.Fields{
"Caller": "Main",
}).Info("Still found running tasks. No agent to be removed")