Skip to content

Cooperation with safely #9

Discussion options

You must be logged in to vote

I think we could use it inside a check-fn with :salutem/time-to-re-evaluation:

(fn [context callback-fn]
  (safely
    ;; IO call goes here, for example `http/get`.

    :on-error
    :max-retries 5
    :circuit-breaker :external-service))

Then, elsewhere in code we can reuse this circuit breaker:

(safely
  ;; IO call goes here, for example `http/get`.

  :on-error
  :max-retries 5
  :circuit-breaker :external-service)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by piotr-yuxuan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8 on November 05, 2021 20:22.