Liking cljdoc? Tell your friends :D

com.6pages.datomic.utils


retryable-anomaly?clj

Set of retryable anomalies.

Set of retryable anomalies.
sourceraw docstring

with-retryclj

(with-retry
  op
  &
  {:keys [retry? backoff]
   :or {retry?
          (fn [e]
              (-> e ex-data :cognitect.anomalies/category retryable-anomaly?))
        backoff (fn [epoch] (when (<= epoch 10) (* 200 epoch)))}})

Try op, return result if successful, if op throws, check exception against retry? pred, retrying if the predicate returns true. Optional backoff function controls retry wait. Backoff function should return msec backoff desired or nil to stop retry. Defaults to trying 10 times with linear backoff.

Try op, return result if successful, if op throws, check exception against retry? pred,
retrying if the predicate returns true. Optional backoff function controls retry wait. Backoff
function should return msec backoff desired or nil to stop retry.
Defaults to trying 10 times with linear backoff. 
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close