Refactor logging in checkAllTimeouts

This commit is contained in:
2025-08-19 19:25:15 +02:00
parent 1aaab96cec
commit a9e3801eae

View File

@@ -17,10 +17,10 @@ func (im *instanceManager) checkAllTimeouts() {
// Stop the timed-out instances
for _, name := range timeoutInstances {
log.Printf("Instance %s has timed out, stopping it", name)
if proc, err := im.StopInstance(name); err != nil {
if _, err := im.StopInstance(name); err != nil {
log.Printf("Error stopping instance %s: %v", name, err)
} else {
log.Printf("Instance %s stopped successfully, process: %v", name, proc)
log.Printf("Instance %s stopped successfully", name)
}
}
}