NatureWhistle.Notifier.Retry (nature_whistle v0.1.0)

Copy Markdown

Retry helper for HTTP notifiers. Reads retry configuration from the host's config/config.exs.

Example config:

config :nature_whistle, retry: [
  max_attempts: 5,
  base_delay_ms: 1000,
  max_delay_ms: 30_000
]

Summary

Functions

Executes the given function, retrying on failure up to the configured max attempts.

Functions

with_retry(fun)

Executes the given function, retrying on failure up to the configured max attempts.

The function must return {:ok, _} or {:error, _}.