fix: trim sleep times

This commit is contained in:
Julian Sommer
2026-05-22 11:34:20 +10:00
parent d323facf65
commit b3d8a7d262
3 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -1753,7 +1753,7 @@ func runAdminJoin(cmd *cobra.Command, args []string) {
}
fmt.Printf(" Waiting for cluster formation... (%d/%d nodes joined)\n", statusResp.Joined, statusResp.Expected)
time.Sleep(2 * time.Second)
time.Sleep(500 * time.Millisecond)
}
fmt.Printf("✅ Cluster formation complete! (%d nodes)\n\n", statusResp.Expected)
+1 -1
View File
@@ -98,7 +98,7 @@ func runClusterShutdown(cmd *cobra.Command, args []string) {
}
nc.Flush()
// Wait briefly for messages to propagate
time.Sleep(2 * time.Second)
time.Sleep(200 * time.Millisecond)
fmt.Printf("[INFRA] Complete\n")
break
}
-3
View File
@@ -7,7 +7,6 @@ import (
"os"
"os/exec"
"path/filepath"
"time"
"github.com/mulgadc/spinifex/spinifex/utils"
"github.com/nats-io/nats.go"
@@ -263,8 +262,6 @@ func (d *Daemon) handleShutdownInfra(msg *nats.Msg) {
slog.Info("Shutdown INFRA phase complete, exiting", "node", d.node)
// Give a moment for log flush
time.Sleep(500 * time.Millisecond)
os.Exit(0)
}