(config->runner {:keys [max-attempts strategy-parameters catch? failed?]
:or {catch? (constantly false) failed? (constantly false)}
:as retry-config})
(exponential-backoff-config max-attempts
slot-time-ms
&
{:keys [catch? failed?] :as control-fns})
Uses an exponential backoff algorithm, meaning that, for every attempt, it
will wait K * slot-time-ms
, where K is a random number between 0 and
2^c - 1
, c
being the attempt index.
Uses an exponential backoff algorithm, meaning that, for every attempt, it will wait K * `slot-time-ms`, where K is a random number between 0 and `2^c - 1`, `c` being the attempt index.
(simple-sleep-config max-attempts
sleep-ms
&
{:keys [catch? failed?] :as control-fns})
Between each attempt sleep for sleep-ms
seconds.
Between each attempt sleep for `sleep-ms` seconds.
(with runner-config & body)
Tries to run body
using the provided configuration.
Tries to run `body` using the provided configuration.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close