Skip to content

Commit

Permalink
daemon: log container history update as non-critical failure (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed Mar 5, 2020
1 parent 61ac3a1 commit 0d13d89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions daemon/inertiad/daemon/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ func (s *Server) upHandler(w http.ResponseWriter, r *http.Request) {
}

// Update container management history following a successful build and deployment
err = s.deployment.UpdateContainerHistory(s.docker)
if err != nil {
stream.Error(res.ErrInternalServer("failed to update container history following build", err))
if err = s.deployment.UpdateContainerHistory(s.docker); err != nil {
stream.Println("warning: failed to update container history:", err)
}

stream.Success(res.Msg("Project startup initiated!", http.StatusCreated))
Expand Down
4 changes: 2 additions & 2 deletions daemon/inertiad/log/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func (s *Streamer) GetSocketWriter() (io.Writer, error) {
}

// Println prints to logger's standard writer
func (s *Streamer) Println(a interface{}) {
fmt.Fprintln(s.Writer, a)
func (s *Streamer) Println(a ...interface{}) {
fmt.Fprintln(s.Writer, a...)
}

// Error directs message and status to http.Error when appropriate
Expand Down

0 comments on commit 0d13d89

Please sign in to comment.