Liking cljdoc? Tell your friends :D

dev.kwill.datomic-backup.retry


capped-exponential-backoffclj

(capped-exponential-backoff)
(capped-exponential-backoff base max-backoff max-retries)

Returns a function of the num-retries (so far), which returns the lesser of max-backoff and an exponentially increasing multiple of base, or nil when (>= num-retries max-retries). See with-retry to see how it is used. Alpha. Subject to change.

Returns a function of the num-retries (so far), which returns the
lesser of max-backoff and an exponentially increasing multiple of
base, or nil when (>= num-retries max-retries).
See with-retry to see how it is used.
Alpha. Subject to change.
sourceraw docstring

capped-exponential-backoff-with-jitterclj

(capped-exponential-backoff-with-jitter)
(capped-exponential-backoff-with-jitter {:keys [base max-backoff max-retries
                                                max-jitter-ms rand-int]
                                         :or {base 100
                                              max-backoff 20000
                                              max-retries 64
                                              max-jitter-ms 100
                                              rand-int rand-int}})
source

default-retriable?clj

(default-retriable? x)

Returns true if x is an anomaly or if it is an ExceptionInfo with an anomaly in its ex-data.

Returns true if x is an anomaly or if it is an ExceptionInfo with an anomaly
in its ex-data.
sourceraw docstring

with-retryclj

(with-retry work-fn)
(with-retry work-fn {:keys [retriable? backoff]})

Calls work-fn until retriable? is false or backoff returns nil. If work-fn throws, the exception will be passed to retriable?. If it is not retriable, the exception will be thrown. work-fn is a function of no arguments. retriable? is passed the result or exception from calling work-fn. backoff is a function of the number of times work-fn has been called.

Calls work-fn until retriable? is false or backoff returns nil. If work-fn
throws, the exception will be passed to retriable?. If it is not retriable, the
exception will be thrown. work-fn is a function of no arguments. retriable? is
passed the result or exception from calling work-fn. backoff is a function of
the number of times work-fn has been called.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close