3.2.6. effect.retry module

Retrying effects.

effect.retry.retry(effect, should_retry)

Retry an effect as long as it raises an exception and as long as the should_retry error handler returns an Effect of True.

If should_retry returns an Effect of False, then the returned effect will fail with the most recent error from func.

  • effect (effect.Effect) – Any effect.
  • should_retry – A function which should take an exc_info tuple as an argument and return an effect of bool.