module

Session::Retry

Retry utility for resilient operations

Instance methods

retryable_connection_error?(ex : Exception) : Bool

Predicates for common retry scenarios

Source
retryable_network_error?(ex : Exception) : Bool
Source
retryable_timeout_error?(ex : Exception) : Bool
Source
with_retry(config : RetryConfig = Session.config.retry_config, &block : -> T) : T forall T

Retry a block with exponential backoff

Source
with_retry_if(should_retry : Exception -> Bool, config : RetryConfig = Session.config.retry_config, &block : -> T) : T forall T

Retry with custom retry condition

Source