We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f9fd3c commit 33bfe35Copy full SHA for 33bfe35
1 file changed
tests/test_convertapi.py
@@ -111,12 +111,14 @@ def test_polling_too_fast_and_getting_202_accepted(self):
111
raise AssertionError
112
113
114
+retry_sleep_base_timeout = 0.1
115
+
116
def get_poll_result(job_id, retry_count=5):
117
try:
118
result = convertapi.async_poll(job_id)
- except Exception as error:
119
+ except convertapi.ApiError:
120
if retry_count > 0:
- time.sleep(0.1)
121
+ time.sleep((1 + 0.1) ** (5 - retry_count) - 1)
122
return get_poll_result(job_id, retry_count=retry_count - 1)
123
else:
124
raise error
0 commit comments