remove npl
This commit is contained in:
@@ -7,23 +7,8 @@ import (
|
||||
|
||||
type HealthHandler struct {
|
||||
ocr interface{ HealthCheck() error }
|
||||
nlp interface{ HealthCheck() error }
|
||||
}
|
||||
|
||||
func (h *HealthHandler) Check(c *gin.Context) {
|
||||
status := gin.H{"status": "healthy"}
|
||||
|
||||
if err := h.ocr.HealthCheck(); err != nil {
|
||||
status["ocr"] = err.Error()
|
||||
} else {
|
||||
status["ocr"] = "healthy"
|
||||
}
|
||||
|
||||
if err := h.nlp.HealthCheck(); err != nil {
|
||||
status["nlp"] = err.Error()
|
||||
} else {
|
||||
status["nlp"] = "healthy"
|
||||
}
|
||||
|
||||
api.Success(c, status)
|
||||
api.Success(c, gin.H{"status": "healthy"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user