File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package server
22
33import (
44 "context"
5+ "fmt"
56 "net/http"
67 "time"
78
@@ -52,7 +53,7 @@ func (s *Server) LivenessHandler(c echo.Context) error {
5253// @Success 200 {object} HealthResponse "Service is ready or not"
5354// @Router /health/readiness [get]
5455func (s * Server ) ReadinessHandler (c echo.Context ) error {
55- ctx , cancel := context .WithTimeout (c .Request ().Context (), 500 * time .Millisecond )
56+ ctx , cancel := context .WithTimeout (c .Request ().Context (), 10 * time .Second )
5657 defer cancel ()
5758
5859 dbStatus := StatusDown
@@ -61,6 +62,8 @@ func (s *Server) ReadinessHandler(c echo.Context) error {
6162 if _ , err := s .store .GetTimestamp (ctx ); err == nil {
6263 dbStatus = StatusUp
6364 httpStatus = http .StatusOK
65+ } else {
66+ fmt .Println (err .Error ())
6467 }
6568 stat := s .store .Stat ()
6669
You can’t perform that action at this time.
0 commit comments