fluxion_ai.utils.retry module

fluxion_ai.utils.retry

This module provides a decorator for retrying a function call if it raises an exception.

Functions:
  • retry: Retry a function call if it raises an exception.

fluxion_ai.utils.retry.retry(attempts: int, delay: float = 0.0)[source]

Retry a function call if it raises an exception.

Parameters:
  • attempts (int) – Number of retry attempts.

  • delay (float) – Delay in seconds between attempts.

Returns:

A decorator that retries the function.

Return type:

Callable