tenacity
tenacity copied to clipboard
Retry decorator does not play well with other decorators
This may be related to #318, but it involves the return value rather than the type.
When using the retry decorator with ddtrace-py's tracer.wrap(), the return value of the function seems to always be None despite the function actually returning a value.
The function looks something like:
@retry(
retry=(
retry_if_exception_type(APIError)
),
stop=stop_after_delay(120),
wait=wait_random_exponential(multiplier=0.5, max=20)
)
@tracer.wrap()
async def get_value(self):
return 'value'