Last active
May 28, 2018 15:51
-
-
Save AndrewDryga/7d86fe0868a264a52b27fe0fcde28304 to your computer and use it in GitHub Desktop.
Sage: Stage with Retry in Compensation
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 delete_subscription(_effect_to_compensate, %{user: user}, _name_and_reason, _attrs) do | |
:ok = SageExample.Billing.APIClient.delete_all_subscriptions_for_user(user) | |
# We want to apply forward recovery from :subscription stage for 5 times | |
{:retry, retry_limit: 5, base_backoff: 10, max_backoff: 30_000, enable_jitter: true} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment