forked from mtusi2026/mtusi2026lab3
feat: implement estim 4
This commit is contained in:
@@ -16,6 +16,10 @@ func (h *Handler) Live(w http.ResponseWriter, _ *http.Request) {
|
||||
}
|
||||
|
||||
func (h *Handler) Ready(w http.ResponseWriter, r *http.Request) {
|
||||
if h.draining.Load() {
|
||||
h.fail(w, r, fmt.Errorf("%w: draining", domain.ErrUnavailable))
|
||||
return
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(r.Context(), readyTimeout)
|
||||
defer cancel()
|
||||
for _, dep := range h.deps {
|
||||
|
||||
Reference in New Issue
Block a user