Rather than pass :else 'ignore to plz, you should probably wrap plz in ignore-errors, because it appears that you want those requests to be synchronous.
Generally, you could probably simplify it like this:
(cl-defmethod ready-p ((proxy kele--proxy-record))
"Return non-nil if the PROXY is ready for requests.
Returns nil on any curl error."
(let ((ready-addr (format "%s/readyz" (kele--url proxy)))
(live-addr (format "%s/livez" (kele--url proxy))))
(ignore-errors
(and (= 200 (plz-response-status (plz 'get ready-addr :as 'response)))
(= 200 (plz-response-status (plz 'get live-addr :as 'response)))))))
The same is probably so for the earlier place in the file where a similar check is done. :)
Hi,
FYI, in this code:
https://github.com/jinnovation/kele.el/blob/d50dd190807fd466fe078afe1c156cc463ecc102/kele.el#L591-L592
Rather than pass
:else 'ignore
toplz
, you should probably wrapplz
inignore-errors
, because it appears that you want those requests to be synchronous.Generally, you could probably simplify it like this:
The same is probably so for the earlier place in the file where a similar check is done. :)