Retry was copied and modified version of retry.clj from https://github.com/cognitect-labs/aws-api. This software is licensed under same license and original Copyright statements included in this file.
Retry was copied and modified version of retry.clj from https://github.com/cognitect-labs/aws-api. This software is licensed under same license and original Copyright statements included in this file.
(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.
Returns (capped-exponential-backoff 100 20000 3). Alpha. Subject to change.
Returns (capped-exponential-backoff 100 20000 3). Alpha. Subject to change.
(default-retriable? response)
Returns true if response is categorized as retriable or is exception with ex-data which is categorized as retriable.
Returns true if response is categorized as retriable or is exception with ex-data which is categorized as retriable.
(with-retry req-fn resp-chan)
(with-retry req-fn resp-chan retriable? backoff)
For internal use. Do not call directly. Calls req-fn, a non-blocking function that wraps some operation and returns a channel. When the response to req-fn is retriable? and backoff returns an int, waits backoff ms and retries, otherwise puts response on resp-chan. Resp-chan is closed when src-chan is closed.
For internal use. Do not call directly. Calls req-fn, a *non-blocking* function that wraps some operation and returns a channel. When the response to req-fn is retriable? and backoff returns an int, waits backoff ms and retries, otherwise puts response on resp-chan. Resp-chan is closed when src-chan is closed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close