View Source Sage.Executor.Retries (Sage v0.6.3)

This module implements retry logic with exponential back-off for compensations that want to retry transaction.

Link to this section Summary

Functions

Returns true if transaction should be retried, false - otherwise. Optionally, return would be delayed with an exponential backoff based on Sage.retry_opts/0.

Link to this section Functions

Link to this function

retry_with_backoff?(attempt, opts)

View Source
@spec retry_with_backoff?(attempt :: pos_integer(), opts :: Sage.retry_opts()) ::
  boolean()

Returns true if transaction should be retried, false - otherwise. Optionally, return would be delayed with an exponential backoff based on Sage.retry_opts/0.

Malformed retry options would be logged and ignored.