Skip to content

Commit

Permalink
add status err messages to start/stop/remove
Browse files Browse the repository at this point in the history
  • Loading branch information
bcicen committed Jan 11, 2018
1 parent d46ce78 commit 107def9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions container/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (c *Container) Start() {
if c.Meta["state"] != "running" {
if err := c.manager.Start(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
return
}
c.SetState("running")
Expand All @@ -103,6 +104,7 @@ func (c *Container) Stop() {
if c.Meta["state"] == "running" {
if err := c.manager.Stop(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
return
}
c.SetState("exited")
Expand All @@ -112,5 +114,6 @@ func (c *Container) Stop() {
func (c *Container) Remove() {
if err := c.manager.Remove(); err != nil {
log.Warningf("container %s: %v", c.Id, err)
log.StatusErr(err)
}
}
3 changes: 3 additions & 0 deletions grid.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ func Display() bool {
})

ui.Handle("/timer/1s", func(e ui.Event) {
if log.StatusQueued() {
ui.StopLoop()
}
RefreshDisplay()
})

Expand Down

0 comments on commit 107def9

Please sign in to comment.