safwank / ElixirRetry

Simple Elixir macros for linear retry, exponential backoff and wait with composable delays
Other
441 stars 32 forks source link

Different Atoms for Retry #21

Closed rawkode closed 6 years ago

rawkode commented 6 years ago

Hi,

I'm working on some middleware system and I'd like to use this library for retries.

The middleware already has an API that expects {:ok, _}, {:skip, _}, or {:error, _}

I'd like to use retry, but configure it only to retry on {:retry, _}

Having looked at the code, I don't believe this is possible. Would you accept a PR that made this configurable?

safwank commented 6 years ago

@rawkode Sure. You can pass the list of atoms as an option.

safwank commented 6 years ago

This has been included in v0.9. Thanks for the PR @rawkode.