Mykola Palamarchuk06/21/2022, 2:32 PM
? And how does it work internally? My case: a HTTP request may fail sometimes with different errors that require individual retry policy. E.g. some response means we have to wait 30 seconds and can be retry only once (NotReadyYetException), but another response requires exponential timeout and can be retried more times (TemporaryServerOutageException). Is it possible to model that somehow?
David Hyman06/21/2022, 2:44 PM
with the different parameters you described
try: request except NotYetReady as e: raise RetryRequested(seconds_to_wait=30) from e except TemporaryOutage as e: raise RetryRequested(backoff=Backoff.EXPONENTIAL) from e
Mykola Palamarchuk06/21/2022, 3:05 PM
David Hyman06/21/2022, 3:20 PM