python-botocore/botocore/retries/base.py

27 lines
797 B
Python
Raw Normal View History

2022-05-26 00:10:07 +02:00
class BaseRetryBackoff:
2020-03-22 13:12:42 +01:00
def delay_amount(self, context):
"""Calculate how long we should delay before retrying.
:type context: RetryContext
"""
raise NotImplementedError("delay_amount")
2022-05-26 00:10:07 +02:00
class BaseRetryableChecker:
2020-03-22 13:12:42 +01:00
"""Base class for determining if a retry should happen.
This base class checks for specific retryable conditions.
A single retryable checker doesn't necessarily indicate a retry
will happen. It's up to the ``RetryPolicy`` to use its
``BaseRetryableCheckers`` to make the final decision on whether a retry
should happen.
"""
def is_retryable(self, context):
"""Returns True if retryable, False if not.
:type context: RetryContext
"""
2021-11-03 18:14:15 +01:00
raise NotImplementedError("is_retryable")