resilience4clj-retry icon indicating copy to clipboard operation
resilience4clj-retry copied to clipboard

Fix `retry/create` example

Open rwev opened this issue 5 years ago • 0 comments

Thanks for the sweet lib!

The example of how to create a retry with configuration doesn't run:

(def retry (r/create {:max-attempts 10
                      :wait-duration 300}))
clojure.lang.PersistentArrayMap is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')

This example requires a name string, e.g.

(def retry "my-retry" (r/create {:max-attempts 10
                      :wait-duration 300}))
=>
#object[io.github.resilience4j.retry.internal.RetryImpl
        0x4941ec8f
        "io.github.resilience4j.retry.internal.RetryImpl@4941ec8f"]

Fixing this would help others get started with the library, as I ran into this issue myself trying to get set up.

rwev avatar Oct 04 '19 20:10 rwev