diff options
| author | Jeff Carr <[email protected]> | 2024-11-01 00:41:00 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-01 00:41:00 -0500 |
| commit | c1d86fc324671995ee6dc279c7568bceda1cc910 (patch) | |
| tree | b7ba69757e251da753780cf6a8a8b1e8e60a2d75 /create.go | |
| parent | 26cd0f7709ba552b98aeee83723612eb5e7009cb (diff) | |
common d.SprintHeader() functions for humans
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'create.go')
| -rw-r--r-- | create.go | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -9,7 +9,6 @@ import ( "time" "github.com/google/uuid" - "go.wit.com/lib/gui/shell" pb "go.wit.com/lib/protobuf/virtbuf" "go.wit.com/log" ) @@ -35,7 +34,7 @@ func create(w http.ResponseWriter, r *http.Request) (string, error) { } } d.StartState = pb.DropletState_OFF - d.Current.State = pb.DropletState_OFF + d.SetState(pb.DropletState_OFF) d.Memory = 2048 * 1024 * 1024 d.Cpus = 2 @@ -106,9 +105,9 @@ func startDroplet(d *pb.Droplet) (string, error) { // how long has the cluster been stable? // wait until it is stable. use this to throttle droplet starts dur := time.Since(me.unstable) - result = fmt.Sprintln("should start droplet", name, "here. grid stable for:", shell.FormatDuration(dur)) + result = fmt.Sprintln("should start droplet", name, "here. grid stable for:", pb.FormatDuration(dur)) if dur < me.unstableTimeout { - tmp := shell.FormatDuration(me.unstableTimeout) + tmp := pb.FormatDuration(me.unstableTimeout) result += "grid is still too unstable (unstable timeout = " + tmp + ")" return result, errors.New("grid is still unstable") } |
