Last active
June 3, 2018 17:41
-
-
Save AndrewDryga/74ee583e2802acf45b25e7990b377b77 to your computer and use it in GitHub Desktop.
Sage: Stage with Circuit Breaker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def currency_exchange_rates_circuit_breaker(_effect_to_compensate, _effects_so_far, %{"base_currency" => base_currency}) do | |
with {:ok, exchange_rates} <- BookingApp.Cache.fetch(:eur_exchange_rates, base_currency) do | |
{:continue, exchange_rates} | |
else | |
_ -> :ok | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment