Skip to content

Commit

Permalink
fix: reduce health check log when healthy
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasoca committed May 13, 2023
1 parent fe3269f commit 2c78ca1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pkg/app/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,12 @@ func (h *HttpHandlers) HealthCheckHandler(w http.ResponseWriter, r *http.Request
if err != nil {
log.Printf("Server is not healthy")
w.WriteHeader(http.StatusInternalServerError)
w.Header().Set("Content-type", "application/json")
_, err = w.Write([]byte(`{"message": "Failed processing file"}`))
if err != nil {
log.Panic(err)
}
return
}
w.WriteHeader(http.StatusOK)
log.Println(w, "OK")
}
1 change: 0 additions & 1 deletion pkg/generator/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ func CheckVersion() error {
log.Println(out.String())
return errors.New("latex backend not available")
}
log.Println("Latex backend available")
return err
}

0 comments on commit 2c78ca1

Please sign in to comment.