Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -182,11 +182,10 @@ async def make_request(session, token, data, url, index, max_retries=3):
|
|
182 |
result_data = await response.text()
|
183 |
return result_data
|
184 |
except (asyncio.TimeoutError, aiohttp.ClientError, requests.exceptions.HTTPError) as e:
|
185 |
-
LoggaTesto("ERRORE ASYNC", {e})
|
186 |
if isinstance(e, (asyncio.TimeoutError, requests.exceptions.HTTPError)) and e.response.status in [502, 504]:
|
187 |
break
|
188 |
-
|
189 |
-
await asyncio.sleep(1)
|
190 |
raise Exception("Max retries reached or skipping retries. Unable to make the request.")
|
191 |
|
192 |
async def CreaListaInput(input_data):
|
|
|
182 |
result_data = await response.text()
|
183 |
return result_data
|
184 |
except (asyncio.TimeoutError, aiohttp.ClientError, requests.exceptions.HTTPError) as e:
|
185 |
+
LoggaTesto("ERRORE ASYNC", {e}, false)
|
186 |
if isinstance(e, (asyncio.TimeoutError, requests.exceptions.HTTPError)) and e.response.status in [502, 504]:
|
187 |
break
|
188 |
+
await asyncio.sleep(3)
|
|
|
189 |
raise Exception("Max retries reached or skipping retries. Unable to make the request.")
|
190 |
|
191 |
async def CreaListaInput(input_data):
|