diff options
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") } |
