better log message
All checks were successful
Pipeline was successful

This commit is contained in:
Tobias Trabelsi 2023-11-13 21:21:58 +01:00
parent 48b4b273ee
commit 174c40c72c
Signed by: lerentis
GPG Key ID: FF0C2839718CAF2E
2 changed files with 5 additions and 2 deletions

View File

@ -100,7 +100,7 @@ func main() {
if len(ownedNodes) == 0 {
log.WithFields(log.Fields{
"Caller": "Main",
}).Infof("Nothing running and not owning any nodes. Recheck in %d", cfg.CheckInterval)
}).Info("Nothing running and not owning any nodes")
} else {
log.WithFields(log.Fields{
"Caller": "Main",
@ -122,6 +122,9 @@ func main() {
}
}
}
log.WithFields(log.Fields{
"Caller": "Main",
}).Infof("Recheck in %d", cfg.CheckInterval)
time.Sleep(time.Duration(cfg.CheckInterval) * time.Minute)
}
}

View File

@ -25,7 +25,7 @@ func DecomAgent(cfg *config.Config, agentId int64) error {
log.WithFields(log.Fields{
"Caller": "DecomAgent",
}).Debugf("Deleting %d agent from woodpecker", agentId)
}).Debugf("Deleting agent with id %d from woodpecker", agentId)
resp, err := http.DefaultClient.Do(req)
if err != nil {