parent
089df0ff7f
commit
bbaa89d4c2
@ -86,10 +86,15 @@ func main() {
|
||||
"Caller": "Main",
|
||||
}).Fatal(fmt.Sprintf("Error checking woodpecker queue: %s", err.Error()))
|
||||
}
|
||||
if runningTasks <= len(ownedNodes) {
|
||||
if runningTasks <= len(ownedNodes) && runningTasks != 0 {
|
||||
log.WithFields(log.Fields{
|
||||
"Caller": "Main",
|
||||
}).Info("Still found running tasks. No agent to be removed")
|
||||
} else {
|
||||
if len(ownedNodes) == 0 {
|
||||
log.WithFields(log.Fields{
|
||||
"Caller": "Main",
|
||||
}).Infof("Nothing running and not owning any nodes. Recheck in %d", cfg.CheckInterval)
|
||||
} else {
|
||||
log.WithFields(log.Fields{
|
||||
"Caller": "Main",
|
||||
@ -107,6 +112,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Duration(cfg.CheckInterval) * time.Minute)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user