dont remove agents when agent did not yet pick up job
All checks were successful
Pipeline was successful

This commit is contained in:
Tobias Trabelsi 2023-11-08 21:13:08 +01:00
parent 9f90962d92
commit f9cebaf216
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 {
if runningTasks <= len(ownedNodes) && runningTasks != 0 && pendingTasks > 0 {
log.WithFields(log.Fields{
"Caller": "Main",
}).Info("Still found running tasks. No agent to be removed")