module Session::Retry

Overview

Retry utility for resilient operations

Extended Modules

Defined in:

retry.cr

Instance Method Summary

Instance Method Detail

def retryable_connection_error?(ex : Exception) : Bool #

Predicates for common retry scenarios


[View source]
def retryable_network_error?(ex : Exception) : Bool #

[View source]
def retryable_timeout_error?(ex : Exception) : Bool #

[View source]
def with_retry(config : RetryConfig = Session.config.retry_config, &block : -> T) : T forall T #

Retry a block with exponential backoff


[View source]
def with_retry_if(should_retry : Exception -> Bool, config : RetryConfig = Session.config.retry_config, &block : -> T) : T forall T #

Retry with custom retry condition


[View source]