kedro.contrib.decorators.retry¶
-
kedro.contrib.decorators.retry(exceptions=<class 'Exception'>, n_times=1, delay_sec=0)[source]¶ Catches exceptions from the wrapped function at most n_times and then bundles them and propagates them.
Make sure your function does not mutate the arguments
Parameters: - exceptions (
Type[Exception]) – The superclass of exceptions to catch. By default catch all exceptions. - n_times (
int) – At most let the function fail n_times. The bundle the errors and propagate them. By default retry only once. - delay_sec (
float) – Delay between failure and next retry in seconds
Return type: CallableReturns: The original function with retry functionality.
- exceptions (