refresh node information
All checks were successful
Pipeline was successful

This commit is contained in:
2023-11-04 22:37:09 +01:00
parent 047e859efa
commit e304781ba3
2 changed files with 15 additions and 0 deletions

View File

@ -59,6 +59,12 @@ func main() {
}).Fatal(fmt.Sprintf("Error spawning new agent: %s", err.Error()))
}
for {
server, err = hetzner.RefreshNodeInfo(cfg, server.ID)
if err != nil {
log.WithFields(log.Fields{
"Caller": "Main",
}).Fatal(fmt.Sprintf("Failed to start Agent: %s", err.Error()))
}
if server.Status == hcloud.ServerStatusRunning {
log.WithFields(log.Fields{
"Caller": "Main",