File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import importlib .metadata
44
55__title__ : str = "unstructured-client"
6- __version__ : str = "0.43.2 "
6+ __version__ : str = "0.43.3 "
77__openapi_doc_version__ : str = "1.2.31"
88__gen_version__ : str = "2.680.0"
99__user_agent__ : str = "speakeasy-sdk/python 0.43.2 2.680.0 1.2.31 unstructured-client"
Original file line number Diff line number Diff line change @@ -172,7 +172,11 @@ def retry_with_backoff(
172172 if isinstance (exception , TemporaryError ):
173173 return exception .response
174174
175- raise
175+ elapsed_seconds = (now - start ) / 1000
176+ raise type (exception )(
177+ f"{ type (exception ).__name__ } after { retries + 1 } retries "
178+ f"over { elapsed_seconds :.1f} s: { exception } "
179+ ) from exception
176180 sleep = (initial_interval / 1000 ) * exponent ** retries + random .uniform (0 , 1 )
177181 sleep = min (sleep , max_interval / 1000 )
178182 time .sleep (sleep )
@@ -200,7 +204,11 @@ async def retry_with_backoff_async(
200204 if isinstance (exception , TemporaryError ):
201205 return exception .response
202206
203- raise
207+ elapsed_seconds = (now - start ) / 1000
208+ raise type (exception )(
209+ f"{ type (exception ).__name__ } after { retries + 1 } retries "
210+ f"over { elapsed_seconds :.1f} s: { exception } "
211+ ) from exception
204212 sleep = (initial_interval / 1000 ) * exponent ** retries + random .uniform (0 , 1 )
205213 sleep = min (sleep , max_interval / 1000 )
206214 await asyncio .sleep (sleep )
You can’t perform that action at this time.
0 commit comments